Packages

  • package root
    Definition Classes
    root
  • package io
    Definition Classes
    root
  • package circe

    This is the API documentation for Circe, a JSON library for Scala and Scala.js.

    Overview

    This is the API documentation for Circe, a JSON library for Scala and Scala.js.

    The library is divided into a number of modules that either provide core functionality, support additional features via third-party dependencies, or facilitate integration with other libraries or frameworks.

    • numbers: core facilities for representing and parsing JSON numbers.
    • core: our JSON abstract syntax tree, our zipper-like cursor types, and our encoding and decoding type classes (and instances).
    • parser: JSON parsing support for both the Java Virtual Machine (using Jawn) and Scala.js (using the native JavaScript JSON parser).
    • testing: ScalaCheck Arbitrary instances for circe's JSON AST and other types, as well as other useful testing tools.
    • literal: JSON string interpolation and encoder and decoder instances for literal types.
    • generic: Shapeless-powered generic derivation for case classes and sealed trait hierarchies.
    • generic-extras: additional experimental generic derivation functionality (including some configurability).
    • pointer: A JSON Pointer implementation
    • pointer-literal: JSON Pointer string interpolation
    • shapes: encoders and decoders for Shapeless hlists, coproducts, records, and sized collections.
    • scodec: encoders and decoders for Scodec's BitVector and ByteVector.
    • refined: encoders and decoders for refined types.
    • spray: Spray marshaller conversions for Circe's type classes.

    Please refer to the documentation for a more detailed introduction to the library.

    Definition Classes
    io
  • package export
    Definition Classes
    circe
  • package syntax

    This package provides syntax via enrichment classes.

    This package provides syntax via enrichment classes.

    Definition Classes
    circe
  • ACursor
  • Codec
  • CursorOp
  • Decoder
  • DecodingFailure
  • Encoder
  • Error
  • Errors
  • FailedCursor
  • HCursor
  • Json
  • JsonNumber
  • JsonObject
  • KeyDecoder
  • KeyEncoder
  • Parser
  • ParsingFailure
  • Printer
  • disjunctionCodecs

sealed abstract class JsonObject extends Serializable

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

Source
JsonObject.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JsonObject
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def +:(field: (String, Json)): JsonObject

    Prepend the given key-value pair.

  2. abstract def add(key: String, value: Json): JsonObject

    Insert the given key and value.

  3. abstract def apply(key: String): Option[Json]

    Return the JSON value associated with the given key.

  4. abstract def contains(key: String): Boolean

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

  5. abstract def isEmpty: Boolean

    Return true if there are no associations.

  6. abstract def keys: Iterable[String]

    Return all keys in insertion order.

  7. abstract def mapValues(f: (Json) => Json): JsonObject

    Transform all associated JSON values.

  8. abstract def remove(key: String): JsonObject

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

  9. abstract def size: Int

    Return the number of associations.

  10. abstract def toIterable: Iterable[(String, Json)]

    Return all key-value pairs in insertion order.

  11. abstract def toMap: Map[String, Json]

    Convert to a map.

    Convert to a map.

    Note

    This conversion does not maintain insertion order.

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

    Traverse Json values.

  13. abstract def values: Iterable[Json]

    Return all associated values in insertion order.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. 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.

  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. final def equals(that: Any): Boolean

    Definition Classes
    JsonObject → AnyRef → Any
  9. final def filter(pred: ((String, Json)) => Boolean): JsonObject

    Filter by keys and values.

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

    Filter by keys.

  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def hashCode(): Int

    Definition Classes
    JsonObject → AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. final def kleisli: Kleisli[Option, String, Json]

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

  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def nonEmpty: Boolean

    Return true if there is at least one association.

  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. final def toJson: Json

    Return this JsonObject as a Json

  22. final def toList: List[(String, Json)]

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

  23. final def toString(): String

    Definition Classes
    JsonObject → AnyRef → Any
  24. final def toVector: Vector[(String, Json)]

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

  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Operations for accessing contents

Conversions to other collection types

Operations that transform the JSON object

Equality and other operations

Ungrouped