sealed abstract class JsonObject extends Serializable
A mapping from keys to JSON values that maintains insertion order.
- Source
- JsonObject.scala
- Grouped
- Alphabetic
- By Inheritance
- JsonObject
- Serializable
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def +:(field: (String, Json)): JsonObject
Prepend the given key-value pair.
- abstract def add(key: String, value: Json): JsonObject
Insert the given key and value.
- abstract def apply(key: String): Option[Json]
Return the JSON value associated with the given key.
- abstract def contains(key: String): Boolean
Return
true
if there is an association with the given key. - abstract def isEmpty: Boolean
Return
true
if there are no associations. - abstract def keys: Iterable[String]
Return all keys in insertion order.
- abstract def mapValues(f: (Json) => Json): JsonObject
Transform all associated JSON values.
- abstract def remove(key: String): JsonObject
Remove the field with the given key (if it exists).
- abstract def size: Int
Return the number of associations.
- abstract def toIterable: Iterable[(String, Json)]
Return all key-value pairs in insertion order.
- abstract def toMap: Map[String, Json]
Convert to a map.
Convert to a map.
- Note
This conversion does not maintain insertion order.
- abstract def traverse[F[_]](f: (Json) => F[Json])(implicit F: Applicative[F]): F[JsonObject]
Traverse Json values.
- abstract def values: Iterable[Json]
Return all associated values in insertion order.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- Implicit
- This member is added by an implicit conversion from JsonObject toany2stringadd[JsonObject] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
- def ->[B](y: B): (JsonObject, B)
- Implicit
- This member is added by an implicit conversion from JsonObject toArrowAssoc[JsonObject] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- 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 deepMerge(that: JsonObject): JsonObject
Perform a deep merge of this JSON object with another JSON object.
Perform a deep merge of this JSON object with another JSON object.
Objects are merged by key, values from the argument JSON take precedence over values from this JSON. Nested objects are recursed.
See Json.deepMerge for behavior of merging values that are not objects.
- def ensuring(cond: (JsonObject) => Boolean, msg: => Any): JsonObject
- Implicit
- This member is added by an implicit conversion from JsonObject toEnsuring[JsonObject] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: (JsonObject) => Boolean): JsonObject
- Implicit
- This member is added by an implicit conversion from JsonObject toEnsuring[JsonObject] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean, msg: => Any): JsonObject
- Implicit
- This member is added by an implicit conversion from JsonObject toEnsuring[JsonObject] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean): JsonObject
- Implicit
- This member is added by an implicit conversion from JsonObject toEnsuring[JsonObject] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def equals(that: Any): Boolean
- Definition Classes
- JsonObject → AnyRef → Any
- final def filter(pred: ((String, Json)) => Boolean): JsonObject
Filter by keys and values.
- final def filterKeys(pred: (String) => Boolean): JsonObject
Filter by keys.
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from JsonObject toStringFormat[JsonObject] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def hashCode(): Int
- Definition Classes
- JsonObject → AnyRef → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def kleisli: Kleisli[Option, String, Json]
Return a Kleisli arrow that gets the JSON value associated with the given field.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def nonEmpty: Boolean
Return
true
if there is at least one association. - final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def toList: List[(String, Json)]
Return all key-value pairs in insertion order as a list.
- final def toString(): String
- Definition Classes
- JsonObject → AnyRef → Any
- final def toVector: Vector[(String, Json)]
Return all key-value pairs in insertion order as a vector.
- 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): (JsonObject, B)
- Implicit
- This member is added by an implicit conversion from JsonObject toArrowAssoc[JsonObject] 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.