JsonObject

sealed abstract class JsonObject extends Serializable

A mapping from keys to JSON values that maintains insertion order.

Companion:
object
Source:
JsonObject.scala
trait Serializable
class Object
trait Matchable
class Any

Value members

Abstract methods

def +:(field: (String, Json)): JsonObject

Prepend the given key-value pair.

Prepend the given key-value pair.

Source:
JsonObject.scala
def add(key: String, value: Json): JsonObject

Insert the given key and value.

Insert the given key and value.

Source:
JsonObject.scala
def apply(key: String): Option[Json]

Return the JSON value associated with the given key.

Return the JSON value associated with the given key.

Source:
JsonObject.scala

Return true if there is an association with the given key.

Return true if there is an association with the given key.

Source:
JsonObject.scala

Return true if there are no associations.

Return true if there are no associations.

Source:
JsonObject.scala

Return all keys in insertion order.

Return all keys in insertion order.

Source:
JsonObject.scala

Transform all associated JSON values.

Transform all associated JSON values.

Source:
JsonObject.scala

Remove the field with the given key (if it exists).

Remove the field with the given key (if it exists).

Source:
JsonObject.scala
def size: Int

Return the number of associations.

Return the number of associations.

Source:
JsonObject.scala

Return all key-value pairs in insertion order.

Return all key-value pairs in insertion order.

Source:
JsonObject.scala

Convert to a map.

Convert to a map.

Note:

This conversion does not maintain insertion order.

Source:
JsonObject.scala
def traverse[F[_]](f: Json => F[Json])(implicit F: Applicative[F]): F[JsonObject]

Traverse Json values.

Traverse Json values.

Source:
JsonObject.scala

Return all associated values in insertion order.

Return all associated values in insertion order.

Source:
JsonObject.scala

Concrete methods

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.

Source:
JsonObject.scala
final override def equals(that: Any): Boolean
Definition Classes
Any
Source:
JsonObject.scala
final def filter(pred: ((String, Json)) => Boolean): JsonObject

Filter by keys and values.

Filter by keys and values.

Source:
JsonObject.scala
final def filterKeys(pred: String => Boolean): JsonObject

Filter by keys.

Filter by keys.

Source:
JsonObject.scala
final override def hashCode: Int
Definition Classes
Any
Source:
JsonObject.scala

Return a Kleisli arrow that gets the JSON value associated with the given field.

Return a Kleisli arrow that gets the JSON value associated with the given field.

Source:
JsonObject.scala
final def nonEmpty: Boolean

Return true if there is at least one association.

Return true if there is at least one association.

Source:
JsonObject.scala
final def toList: List[(String, Json)]

Return all key-value pairs in insertion order as a list.

Return all key-value pairs in insertion order as a list.

Source:
JsonObject.scala
final override def toString: String
Definition Classes
Any
Source:
JsonObject.scala
final def toVector: Vector[(String, Json)]

Return all key-value pairs in insertion order as a vector.

Return all key-value pairs in insertion order as a vector.

Source:
JsonObject.scala