p

upickle

core

package core

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. case class Abort(msg: String) extends Exception with Product with Serializable

    Throw this inside a Visitor's handler functions to fail the processing of JSON.

    Throw this inside a Visitor's handler functions to fail the processing of JSON. The Facade just needs to provide the error message, and it is up to the driver to ensure it is properly wrapped in a AbortException with the relevant source information.

  2. case class AbortException(clue: String, index: Int, line: Int, col: Int, cause: Throwable) extends Exception with Product with Serializable

    Signals failure processsing JSON after parsing.

  3. trait ArrVisitor[-T, +J] extends ObjArrVisitor[T, J]

    Visits the elements of a json array.

  4. trait BufferingInputStreamParser extends AnyRef

    Defines common functionality to any parser that works on a java.io.InputStream

    Defines common functionality to any parser that works on a java.io.InputStream

    Allows you to look up individual bytes by index, take slices of byte ranges or strings, and drop old portions of buffered data once you are certain you no longer need them.

    The buffer size is managed by allowing it to grow in size until it exceeds its capacity. When that happens, one of two things happen:

    - If the buffer has enough space, we left-shift the data in the buffer to over-write the portion that has already been dropped.

    - If the buffer does not have enough space, we allocate a new buffer big enough to hold the new data we need to store (size a power of two multiple of the old size) and copy the data over, again shifted left .

  5. sealed trait ObjArrVisitor[-T, +J] extends AnyRef

    Base class for visiting elements of json arrays and objects.

    Base class for visiting elements of json arrays and objects.

    T

    ???

    J

    the result of visiting elements (e.g. a json AST or side-effecting writer)

  6. trait ObjVisitor[-T, +J] extends ObjArrVisitor[T, J]

    Visits the elements of a json object.

  7. trait SimpleVisitor[-T, +V] extends Visitor[T, V]

    A visitor that throws an error for all the visit methods which it does not define, letting you only define the handlers you care about.

  8. trait Types extends AnyRef

    Basic functionality to be able to read and write objects.

    Basic functionality to be able to read and write objects. Kept as a trait so other internal files can use it, while also mixing it into the upickle package to form the public API1

  9. trait Visitor[-T, +J] extends AnyRef

    Standard set of hooks uPickle uses to traverse over a structured data.

    Standard set of hooks uPickle uses to traverse over a structured data. A superset of the JSON, MessagePack, and Scala object hierarchies, since it needs to support efficiently processing all of them.

    Note that some parameters are un-set (-1) when not available; e.g. visitArray's length is not set when parsing JSON input (since it cannot be known up front) and the various index parameters are not set when traversing Scala object hierarchies.

    When expecting to deal with a subset of the methods; it is common to forward the ones you don't care about to the ones you do; e.g. JSON visitors would forward all visitFloat32/visitInt/etc. methods to visitFloat64

    T

    ???

    J

    the result of visiting elements (e.g. a json AST or side-effecting writer)

    See also

    http://www.lihaoyi.com/post/ZeroOverheadTreeProcessingwiththeVisitorPattern.html

Value Members

  1. object BufferingInputStreamParser
  2. object NoOpVisitor extends Visitor[Unit, Unit]

    NullFacade discards all JSON AST information.

    NullFacade discards all JSON AST information.

    This is the simplest possible facade. It could be useful for checking JSON for correctness (via parsing) without worrying about saving the data.

    It will always return () on any successful parse, no matter the content.

  3. object Platform
  4. object StringVisitor extends SimpleVisitor[Nothing, Any]
  5. object Util
  6. object Visitor

Ungrouped