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 Json extends Product with Serializable

A data type representing possible JSON values.

Source
Json.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Json
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def asArray: Option[Vector[Json]]
  2. abstract def asBoolean: Option[Boolean]
  3. abstract def asNull: Option[Unit]
  4. abstract def asNumber: Option[JsonNumber]
  5. abstract def asObject: Option[JsonObject]
  6. abstract def asString: Option[String]
  7. abstract def canEqual(that: Any): Boolean
    Definition Classes
    Equals
  8. abstract def foldWith[X](folder: Folder[X]): X

    Reduce this JSON value with the given Json.Folder.

  9. abstract def isArray: Boolean
  10. abstract def isBoolean: Boolean
  11. abstract def isNull: Boolean
  12. abstract def isNumber: Boolean
  13. abstract def isObject: Boolean
  14. abstract def isString: Boolean
  15. abstract def mapArray(f: (Vector[Json]) => Vector[Json]): Json
  16. abstract def mapBoolean(f: (Boolean) => Boolean): Json
  17. abstract def mapNumber(f: (JsonNumber) => JsonNumber): Json
  18. abstract def mapObject(f: (JsonObject) => JsonObject): Json
  19. abstract def mapString(f: (String) => String): Json
  20. abstract def productArity: Int
    Definition Classes
    Product
  21. abstract def productElement(n: Int): Any
    Definition Classes
    Product
  22. abstract def withArray(f: (Vector[Json]) => Json): Json
  23. abstract def withBoolean(f: (Boolean) => Json): Json
  24. abstract def withNull(f: => Json): Json
  25. abstract def withNumber(f: (JsonNumber) => Json): Json
  26. abstract def withObject(f: (JsonObject) => Json): Json
  27. abstract def withString(f: (String) => Json): Json

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 \\(key: String): List[Json]
  5. 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.

  6. final def as[A](implicit d: Decoder[A]): Result[A]

    Attempts to decode this JSON value to another data type.

  7. final def asAccumulating[A](implicit d: Decoder[A]): AccumulatingResult[A]

    Attempts to decode this JSON value to another data type, accumulating failures.

  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  10. def deepDropNullValues: Json

    Drop the entries with a null value if this is an object or array.

  11. 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.

  12. 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.

  13. 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.

  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. 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
  16. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  17. 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."

  18. 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.

  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. final def hcursor: HCursor

    Construct a successful cursor from this JSON value.

  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. final def name: String

    The name of the type of the JSON value.

  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def noSpaces: String

    Pretty-print this JSON value to a string with no spaces.

  26. final def noSpacesSortKeys: String

    Pretty-print this JSON value to a string with no spaces, with object keys sorted alphabetically.

  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. final def printWith(p: Printer): String

    Pretty-print this JSON value to a string using the given pretty-printer.

  30. def productElementName(n: Int): String
    Definition Classes
    Product
  31. def productElementNames: Iterator[String]
    Definition Classes
    Product
  32. def productIterator: Iterator[Any]
    Definition Classes
    Product
  33. def productPrefix: String
    Definition Classes
    Product
  34. final def spaces2: String

    Pretty-print this JSON value to a string indentation of two spaces.

  35. final def spaces2SortKeys: String

    Pretty-print this JSON value to a string indentation of two spaces, with object keys sorted alphabetically.

  36. final def spaces4: String

    Pretty-print this JSON value to a string indentation of four spaces.

  37. final def spaces4SortKeys: String

    Pretty-print this JSON value to a string indentation of four spaces, with object keys sorted alphabetically.

  38. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  39. 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
  40. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  41. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  42. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped