sealed abstract class Json extends Product with Serializable
- Alphabetic
- By Inheritance
- Json
- Serializable
- Product
- Equals
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def asArray: Option[Vector[Json]]
- abstract def asBoolean: Option[Boolean]
- abstract def asNull: Option[Unit]
- abstract def asNumber: Option[JsonNumber]
- abstract def asObject: Option[JsonObject]
- abstract def asString: Option[String]
- abstract def canEqual(that: Any): Boolean
- Definition Classes
- Equals
- abstract def foldWith[X](folder: Folder[X]): X
Reduce this JSON value with the given Json.Folder.
- abstract def isArray: Boolean
- abstract def isBoolean: Boolean
- abstract def isNull: Boolean
- abstract def isNumber: Boolean
- abstract def isObject: Boolean
- abstract def isString: Boolean
- abstract def mapArray(f: (Vector[Json]) => Vector[Json]): Json
- abstract def mapBoolean(f: (Boolean) => Boolean): Json
- abstract def mapNumber(f: (JsonNumber) => JsonNumber): Json
- abstract def mapObject(f: (JsonObject) => JsonObject): Json
- abstract def mapString(f: (String) => String): Json
- abstract def productArity: Int
- Definition Classes
- Product
- abstract def productElement(n: Int): Any
- Definition Classes
- Product
- abstract def withArray(f: (Vector[Json]) => Json): Json
- abstract def withBoolean(f: (Boolean) => Json): Json
- abstract def withNull(f: => Json): Json
- abstract def withNumber(f: (JsonNumber) => Json): Json
- abstract def withObject(f: (JsonObject) => Json): Json
- abstract def withString(f: (String) => Json): Json
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (Json, B)
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def \\(key: String): List[Json]
- final def arrayOrObject[X](or: => X, jsonArray: (Vector[Json]) => X, jsonObject: (JsonObject) => X): X
Run on an array or object or return the given default.
- final def as[A](implicit d: Decoder[A]): Result[A]
Attempts to decode this JSON value to another data type.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def deepDropNullValues: Json
Drop the entries with a null value if this is an object or array.
- def deepMerge(that: Json): Json
Perform a deep merge of this JSON value with another JSON value.
Perform a deep merge of this JSON value with another JSON value.
Objects are merged by key, values from the argument JSON take precedence over values from this JSON. Nested objects are recursed.
Null, Array, Boolean, String and Number are treated as values, and values from the argument JSON completely replace values from this JSON.
- def dropEmptyValues: Json
Drop the entries with an empty value if this is an array or object.
Drop the entries with an empty value if this is an array or object.
Note that this does not apply recursively.
- def dropNullValues: Json
Drop the entries with a null value if this is an object.
Drop the entries with a null value if this is an object.
Note that this does not apply recursively.
- def ensuring(cond: (Json) => Boolean, msg: => Any): Json
- def ensuring(cond: (Json) => Boolean): Json
- def ensuring(cond: Boolean, msg: => Any): Json
- def ensuring(cond: Boolean): Json
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def equals(that: Any): Boolean
Universal equality derived from our type-safe equality.
Universal equality derived from our type-safe equality.
- Definition Classes
- Json → Equals → AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def findAllByKey(key: String): List[Json]
Recursively return all values matching the specified
key
.Recursively return all values matching the specified
key
.The Play docs, from which this method was inspired, reads: "Lookup for fieldName in the current object and all descendants."
- final def fold[X](jsonNull: => X, jsonBoolean: (Boolean) => X, jsonNumber: (JsonNumber) => X, jsonString: (String) => X, jsonArray: (Vector[Json]) => X, jsonObject: (JsonObject) => X): X
The catamorphism for the JSON value data type.
- def formatted(fmtstr: String): String
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def hcursor: HCursor
Construct a successful cursor from this JSON value.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def name: String
The name of the type of the JSON value.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def noSpaces: String
Pretty-print this JSON value to a string with no spaces.
- final def noSpacesSortKeys: String
Pretty-print this JSON value to a string with no spaces, with object keys sorted alphabetically.
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def printWith(p: Printer): String
Pretty-print this JSON value to a string using the given pretty-printer.
- def productElementName(n: Int): String
- Definition Classes
- Product
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def productIterator: Iterator[Any]
- Definition Classes
- Product
- def productPrefix: String
- Definition Classes
- Product
- final def spaces2: String
Pretty-print this JSON value to a string indentation of two spaces.
- final def spaces2SortKeys: String
Pretty-print this JSON value to a string indentation of two spaces, with object keys sorted alphabetically.
- final def spaces4: String
Pretty-print this JSON value to a string indentation of four spaces.
- final def spaces4SortKeys: String
Pretty-print this JSON value to a string indentation of four spaces, with object keys sorted alphabetically.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def toString(): String
Compute a
String
representation for this JSON value.Compute a
String
representation for this JSON value.- Definition Classes
- Json → AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- def →[B](y: B): (Json, B)
- Implicit
- This member is added by an implicit conversion from Json toArrowAssoc[Json] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.