Package

upickle

core

Permalink

package core

Visibility
  1. Public
  2. All

Type Members

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

    Permalink

    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, path: List[Any], cause: Throwable) extends Exception with Product with Serializable

    Permalink

    Signals failure processsing JSON after parsing.

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

    Permalink

    Visits the elements of a json array.

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

    Permalink

    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)

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

    Permalink

    Visits the elements of a json object.

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

    Permalink

    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.

  7. trait Types extends AnyRef

    Permalink

    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

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

    Permalink

    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 NoOpVisitor extends Visitor[Unit, Unit]

    Permalink

    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.

  2. object StringVisitor extends SimpleVisitor[Nothing, Any]

    Permalink
  3. object Util

    Permalink
  4. object Visitor

    Permalink

Ungrouped