sealed abstract class JsonObject extends Serializable
A mapping from keys to JSON values that maintains insertion order.
- Alphabetic
- By Inheritance
- JsonObject
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
-
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( ... )
-
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.
-
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] )
-
final
def
getClass(): Class[_]
- 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(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )