com.rallyhealth.weepickle.v1.core
Members list
Type members
Classlikes
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 wrapped with relevant parser-level information.
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 wrapped with relevant parser-level information.
Attributes
- Supertypes
-
class Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
Visits the elements of a json array.
Visits the elements of a json array.
Attributes
- Supertypes
- Known subtypes
-
Notifies the callback
of top-level results returned by the delegate visitor.
Notifies the callback
of top-level results returned by the delegate visitor.
Useful from extracting return values from visitors that are used in side-effecting positions.
Attributes
- Supertypes
Input data, ready to push through a Visitor.
Input data, ready to push through a Visitor.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
A Visitor specialized to work with JSON types. Forwards the not-JSON-related methods to their JSON equivalents.
Adds a JSON Pointer to exceptions thrown by the delegate Visitor.
Adds a JSON Pointer to exceptions thrown by the delegate Visitor.
JSON Pointer is standardized by RFC 6901 and commonly used by JSON Schema.
Useful for debugging failures. Adds ~10% overhead depending on the parser.
Attributes
- See also
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
JsonPointerVisitor.type
NoOpVisitor discards all JSON AST information.
NoOpVisitor discards all JSON AST information.
This is the simplest possible visitor. It could be useful for checking JSON for correctness (via parsing) without worrying about saving the data.
It will always return Unit on any successful parse, no matter the content.
Attributes
- Companion
- class
- Supertypes
- Self type
-
NoOpVisitor.type
Attributes
- Companion
- object
- Supertypes
- Known subtypes
-
object NoOpVisitor.typeobject NullVisitor.type
Visitor returning null for all instances. Useful in combination with side-effecting visitors, since null is a valid subtype of AnyRef.
Visitor returning null for all instances. Useful in combination with side-effecting visitors, since null is a valid subtype of AnyRef.
Attributes
- Supertypes
- Self type
-
NullVisitor.type
Base class for visiting elements of json arrays and objects.
Base class for visiting elements of json arrays and objects.
Type parameters
- J
-
output result of visiting elements (e.g. a json AST or side-effecting writer)
- T
-
input result of visiting a child of this object or array. object or array builders will typically insert this value into their internal Map or Seq.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait CaseObjectContextShow all
Visits the elements of a json object.
Visits the elements of a json object.
Attributes
- Supertypes
- Known subtypes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Platform.type
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.
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.
Attributes
- Supertypes
- Known subtypes
-
object StringVisitor.typetrait SimpleTo[T]class CaseR[V]class SingletonR[T]trait TaggedFromTo[T]class Leaf[T]class Node[T]trait TaggedTo[T]class Leaf[T]class Node[T]class TupleNTo[V]Show all
Attributes
- Supertypes
-
trait AutoCloseableclass Objecttrait Matchableclass AnyShow all
- Self type
-
StringVisitor.type
Enriches an exception with parser-level information. This could be a problem with either the parsing or with the Visitor consuming the data.
Enriches an exception with parser-level information. This could be a problem with either the parsing or with the Visitor consuming the data.
Value parameters
- col
-
column of text (if applicable) (1-indexed)
- line
-
line of text (if applicable) (1-indexed)
- shortMsg
-
free-text of what/where went wrong.
- token
-
textual representation of the json token (if applicable)
Attributes
- Supertypes
-
class Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
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 com.rallyhealth.weepickle.v1
package to form the public API.
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 com.rallyhealth.weepickle.v1
package to form the public API.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Standard set of hooks weepickle 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.
Standard set of hooks weepickle 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
Type parameters
- J
-
the result of visiting elements (e.g. a json AST or side-effecting writer)
- T
-
the result of ObjArrVisitor.subVisitor which is passed back into a ArrVisitor and ObjVisitor via ObjArrVisitor.visitValue. For example, this might be a weejson.Str that gets passed into an ObjVisitor that's building up a weejson.Obj to be returned on ObjVisitor.visitEnd. Often
T
will be the same type asJ
for visitors that return things, or else Any by visitors that do their work by side-effecting instead of returningJ
.
Attributes
- See also
- Companion
- object
- Supertypes
-
trait AutoCloseableclass Objecttrait Matchableclass Any
- Known subtypes
-
class NoOpVisitor[J]object NoOpVisitor.typeobject NullVisitor.typeobject StringVisitor.typetrait SimpleTo[T]class CaseR[V]class SingletonR[T]trait TaggedFromTo[T]class Leaf[T]class Node[T]trait TaggedTo[T]class Leaf[T]class Node[T]class TupleNTo[V]trait To[T]trait FromTo[T]Show all