package core
- Alphabetic
- Public
- All
Type Members
-
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.
-
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.
-
trait
ArrVisitor[-T, +J] extends ObjArrVisitor[T, J]
Visits the elements of a json array.
-
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 .
-
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)
-
trait
ObjVisitor[-T, +J] extends ObjArrVisitor[T, J]
Visits the elements of a json object.
-
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.
-
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 -
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
'slength
is not set when parsing JSON input (since it cannot be known up front) and the variousindex
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 tovisitFloat64
- T
???
- J
the result of visiting elements (e.g. a json AST or side-effecting writer)
Value Members
- object BufferingInputStreamParser
-
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.
- object Platform
- object StringVisitor extends SimpleVisitor[Nothing, Any]
- object Util
- object Visitor