sealed abstract class Json extends AnyRef
This AST of JSON is made available so that arbitrary JSON may be included as
part of a business object, it is not used as an intermediate representation,
unlike most other JSON libraries. It is not advised to .map
or .mapOrFail
from these decoders, since a higher performance decoder is often available.
Beware of the potential for DOS attacks, since an attacker can provide much more data than is perhaps needed.
Also beware of converting Num
(a BigDecimal
) into any other kind of
number, since many of the stdlib functions are non-total or are known DOS
vectors (e.g. calling .toBigInteger
on a "1e214748364" will consume an
excessive amount of heap memory).
JsonValue / Json / JValue
- Self Type
- Json
- Alphabetic
- By Inheritance
- Json
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def as[A](implicit decoder: JsonDecoder[A]): Either[String, A]
- final def equals(that: Any): Boolean
- Definition Classes
- Json → AnyRef → Any
- final def foldDown[A](initial: A)(f: (A, Json) => A): A
- final def foldDownSome[A](initial: A)(pf: PartialFunction[(A, Json), A]): A
- final def foldUp[A](initial: A)(f: (A, Json) => A): A
- final def foldUpSome[A](initial: A)(pf: PartialFunction[(A, Json), A]): A
- final def get[A <: Json](cursor: JsonCursor[_, A]): Either[String, A]
- final def hashCode(): Int
- Definition Classes
- Json → AnyRef → Any
- final def merge(that: Json): Json
- merging objects results in a new objects with all pairs of both sides, with the right hand side being used on key conflicts
- merging objects results in a new objects with all pairs of both sides, with the right hand side being used on key conflicts
- merging arrays results in all of the individual elements being merged
- scalar values will be replaced by the right hand side
- def toString(): String
- Definition Classes
- Json → AnyRef → Any
- final def transformDown(f: (Json) => Json): Json
- final def transformDownSome(pf: PartialFunction[Json, Json]): Json
- final def transformUp(f: (Json) => Json): Json
- final def transformUpSome(pf: PartialFunction[Json, Json]): Json
- final def widen: Json