ArgonautJson

object ArgonautJson extends AstTransformer[Json]
trait AstTransformer[Json]
trait JsVisitor[Json, Json]
trait Visitor[Json, Json]
trait AutoCloseable
trait Transformer[Json]
class Object
trait Matchable
class Any

Type members

Inherited classlikes

class AstArrVisitor[T[_]](build: T[I] => I)(implicit factory: Factory[I, T[I]])
Inherited from
AstTransformer
class AstObjVisitor[T](build: T => I)(implicit factory: Factory[(String, I), T])
Inherited from
AstTransformer

Value members

Concrete methods

override
def transform[T](i: Json, to: Visitor[_, T]): T
Definition Classes
Transformer
def visitArray(length: Int): ArrVisitor[Json, Json]
def visitFalse(): Json
def visitFloat64StringParts(cs: CharSequence, decIndex: Int, expIndex: Int): Json
def visitNull(): Json
def visitObject(length: Int): ObjVisitor[Json, Json]
def visitString(cs: CharSequence): Json
def visitTrue(): Json

Inherited methods

def apply(s: String): Json
Inherited from
AstTransformer
override
def close(): Unit

==Responsibility== Generally, whoever creates the visitor should be responsible for closing it, i.e. not intermediate transform(v: Visitor) methods themselves.

==Responsibility== Generally, whoever creates the visitor should be responsible for closing it, i.e. not intermediate transform(v: Visitor) methods themselves.

==Self Closing== Given that common usage is most often single-valued (e.g. "{}"), rather than multi-valued (e.g. "{} {} {}"), Visitors may self-close (e.g. visitor.map{v => Try(v.close); v)} after a single value to prevent resource leaks, but are encouraged to expose both forms (i.e. single/multiple), if supportable.

==Multiple close() calls/Idempotency== Visitors are encouraged to respond gracefully if close() is called multiple times. If an underlying resource would throw if already closed, this may mean adding a private var isClosed: Boolean field to prevent multiple calls.

Definition Classes
Visitor -> AutoCloseable
Inherited from
Visitor
def map[Z](f: Json => Z): Visitor[Json, Z]
Inherited from
Visitor
def mapNulls[Z](f: Json => Z): Visitor[Json, Z]
Inherited from
Visitor
def transformArray[T](f: Visitor[_, T], items: Iterable[Json]): T
Inherited from
AstTransformer
def transformObject[T](f: Visitor[_, T], items: Iterable[(String, Json)]): T
Inherited from
AstTransformer
def validate[T](i: Json, to: Visitor[_, T]): Try[T]
Inherited from
Transformer
def visitBinary(bytes: Array[Byte], offset: Int, len: Int): Json
Inherited from
JsVisitor
def visitChar(c: Char): Json
Inherited from
JsVisitor
def visitExt(tag: Byte, bytes: Array[Byte], offset: Int, len: Int): Json
Inherited from
JsVisitor
def visitFloat32(d: Float): Json
Inherited from
JsVisitor
def visitFloat64(d: Double): Json
Inherited from
JsVisitor
def visitFloat64String(s: String): Json
Inherited from
JsVisitor
def visitInt32(i: Int): Json
Inherited from
JsVisitor
def visitInt64(l: Long): Json
Inherited from
JsVisitor
def visitTimestamp(instant: Instant): Json
Inherited from
JsVisitor
def visitUInt64(ul: Long): Json
Inherited from
JsVisitor