Value

ujson.Value
See theValue companion trait
object Value extends AstTransformer[Value]

A very small, very simple JSON AST that uPickle uses as part of its serialization process. A common standard between the Jawn AST (which we don't use so we don't pull in the bulk of Spire) and the Javascript JSON AST.

Attributes

Companion
trait
Graph
Supertypes
trait Sum
trait Mirror
trait Visitor[Value, Value]
trait Transformer[Value]
class Object
trait Matchable
class Any
Show all
Self type
Value.type

Members list

Type members

Classlikes

case class InvalidData(data: Value, msg: String) extends Exception

Thrown when uPickle tries to convert a JSON blob into a given data structure but fails because part the blob is invalid

Thrown when uPickle tries to convert a JSON blob into a given data structure but fails because part the blob is invalid

Value parameters

data

The section of the JSON blob that uPickle tried to convert. This could be the entire blob, or it could be some subtree.

msg

Human-readable text saying what went wrong

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
object Selector

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Selector.type
sealed trait Selector

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Inherited classlikes

class AstArrVisitor[T[_]](build: T[I] => I)(implicit factory: Factory[I, T[I]]) extends ArrVisitor[I, I]

Attributes

Inherited from:
AstTransformer
Supertypes
trait ArrVisitor[I, I]
trait ObjArrVisitor[I, I]
class Object
trait Matchable
class Any
class AstObjVisitor[T](build: T => I)(implicit factory: Factory[(String, I), T]) extends ObjVisitor[I, I]

Attributes

Inherited from:
AstTransformer
Supertypes
trait ObjVisitor[I, I]
trait ObjArrVisitor[I, I]
class Object
trait Matchable
class Any

Types

type Value = Value

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def transform[T](j: Value, f: Visitor[_, T]): T
def visitArray(length: Int, index: Int): ArrVisitor[Value, Value]

Value parameters

index

json source position at the start of the [ being visited

Attributes

Returns

a Visitor used for visiting the elements of the array

def visitFalse(index: Int): Value

Value parameters

index

json source position at the start of the false being visited

Attributes

override def visitFloat64(d: Double, index: Int): Value

Optional handler for raw double values; can be overriden for performance in cases where you're translating directly between numbers to avoid the overhead of stringifying and re-parsing your numbers (e.g. the WebJson transformer gets raw doubles from the underlying Json.parse).

Optional handler for raw double values; can be overriden for performance in cases where you're translating directly between numbers to avoid the overhead of stringifying and re-parsing your numbers (e.g. the WebJson transformer gets raw doubles from the underlying Json.parse).

Delegates to visitFloat64StringParts if not overriden

Value parameters

d

the input number

index

json source position at the start of the number being visited

Attributes

Definition Classes
JsVisitor -> Visitor
override def visitFloat64StringParts(s: CharSequence, decIndex: Int, expIndex: Int, index: Int): Value

Visit the number in its text representation.

Visit the number in its text representation.

Value parameters

decIndex

index of the ., relative to the start of the CharSequence, or -1 if omitted

expIndex

index of e or E relative to the start of the CharSequence, or -1 if omitted

index

json source position at the start of the number being visited

s

unparsed text representation of the number.

Attributes

Definition Classes
Visitor
def visitJsonableObject(length: Int, index: Int): ObjVisitor[Value, Value]
def visitNull(index: Int): Value

Value parameters

index

json source position at the start of the null being visited

Attributes

def visitString(s: CharSequence, index: Int): Value

Value parameters

index

json source position at the start of the string being visited

s

the text string being visited

Attributes

def visitTrue(index: Int): Value

Value parameters

index

json source position at the start of the true being visited

Attributes

Inherited methods

def apply(t: Readable): I

Attributes

Inherited from:
AstTransformer
def map[Z](f: Value => Z): Visitor[T, Z]

Attributes

Inherited from:
Visitor
def mapNulls[Z](f: Value => Z): Visitor[T, Z]

Attributes

Inherited from:
Visitor
def transformArray[T](f: Visitor[_, T], items: Iterable[Value]): T

Attributes

Inherited from:
AstTransformer
def transformObject[T](f: Visitor[_, T], items: Iterable[(String, Value)]): T

Attributes

Inherited from:
AstTransformer

Attributes

Inherited from:
Transformer
def visitBinary(bytes: Array[Byte], offset: Int, len: Int, index: Int): J

Attributes

Inherited from:
JsVisitor
def visitChar(s: Char, index: Int): J

Attributes

Inherited from:
JsVisitor
def visitExt(tag: Byte, bytes: Array[Byte], offset: Int, len: Int, index: Int): J

Attributes

Inherited from:
JsVisitor
def visitFloat32(d: Float, index: Int): J

Attributes

Inherited from:
JsVisitor
def visitFloat64ByteParts(s: Array[Byte], arrOffset: Int, arrLength: Int, decIndex: Int, expIndex: Int, index: Int): J

Attributes

Inherited from:
Visitor
def visitFloat64CharParts(s: Array[Char], arrOffset: Int, arrLength: Int, decIndex: Int, expIndex: Int, index: Int): J

Attributes

Inherited from:
Visitor
def visitFloat64String(s: String, index: Int): J

Convenience methods to help you compute the decimal-point-index and exponent-index of an arbitrary numeric string

Convenience methods to help you compute the decimal-point-index and exponent-index of an arbitrary numeric string

Value parameters

index

json source position at the start of the string being visited

s

the text string being visited

Attributes

Inherited from:
JsVisitor
def visitFloat64StringParts(s: CharSequence, decIndex: Int, expIndex: Int): J

Attributes

Inherited from:
JsVisitor
def visitInt32(i: Int, index: Int): J

Attributes

Inherited from:
JsVisitor
def visitInt64(i: Long, index: Int): J

Attributes

Inherited from:
JsVisitor
override def visitObject(length: Int, jsonableKeys: Boolean, index: Int): ObjVisitor[T, J]

Value parameters

index

json source position at the start of the { being visited

Attributes

Returns

a ObjVisitor used for visiting the keys/values of the object

Definition Classes
JsVisitor -> Visitor
Inherited from:
JsVisitor
def visitUInt64(i: Long, index: Int): J

Attributes

Inherited from:
JsVisitor

Implicits

Implicits

implicit def JsonableBoolean(i: Boolean): Bool
implicit def JsonableByte(i: Byte): Num
implicit def JsonableDict[T](items: IterableOnce[(String, T)])(implicit f: T => Value): Obj
implicit def JsonableDouble(i: Double): Num
implicit def JsonableFloat(i: Float): Num
implicit def JsonableInt(i: Int): Num
implicit def JsonableLong(i: Long): Str
implicit def JsonableNull(i: Null): Null.type
implicit def JsonableSeq[T](items: IterableOnce[T])(implicit f: T => Value): Arr
implicit def JsonableShort(i: Short): Num
implicit def JsonableString(s: CharSequence): Str