Packages

p

io

circe

package circe

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.

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

Package Members

  1. package benchmark
  2. package export
  3. package generic
  4. package hygiene
  5. package jawn
  6. package literal
  7. package numbers
  8. package pointer
  9. package refined
  10. package scalajs
  11. package shapes
  12. package syntax

    This package provides syntax via enrichment classes.

  13. package testing

Type Members

  1. abstract class ACursor extends Serializable

    A zipper that represents a position in a JSON document and supports navigation and modification.

    A zipper that represents a position in a JSON document and supports navigation and modification.

    The focus represents the current position of the cursor; it may be updated with withFocus or changed using navigation methods like left and right.

  2. trait Codec[A] extends Decoder[A] with Encoder[A]

    A type class that provides back and forth conversion between values of type A and the Json format.

    A type class that provides back and forth conversion between values of type A and the Json format.

    Note that this type class is only intended to make instance definition more convenient; it generally should not be used as a constraint.

    Instances should obey the laws defined in io.circe.testing.CodecLaws.

  3. sealed abstract class CursorOp extends Product with Serializable
  4. trait Decoder[A] extends Serializable

    A type class that provides a way to produce a value of type A from a Json value.

  5. sealed abstract class DecodingFailure extends Error

    An exception representing a decoding failure and (lazily) capturing the decoding history resulting in the failure.

  6. trait Encoder[A] extends Serializable

    A type class that provides a conversion from a value of type A to a Json value.

  7. sealed abstract class Error extends Exception

    The base exception type for both decoding and parsing errors.

  8. final case class Errors(errors: NonEmptyList[Error]) extends Exception with Product with Serializable

    A convenience exception type for aggregating one or more decoding or parsing errors.

  9. final class FailedCursor extends ACursor
  10. abstract class HCursor extends ACursor
  11. sealed abstract class Json extends Product with Serializable

    A data type representing possible JSON values.

  12. sealed abstract class JsonNumber extends Serializable

    A JSON number with optimization by cases.

  13. sealed abstract class JsonObject extends Serializable

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

  14. trait KeyDecoder[A] extends Serializable

    A type class that provides a conversion from a string used as a JSON key to a value of type A.

  15. trait KeyEncoder[A] extends Serializable

    A type class that provides a conversion from a value of type A to a string.

    A type class that provides a conversion from a value of type A to a string.

    This type class will be used to create strings for JSON keys when encoding Map[A, ?] instances as JSON.

    Note that if more than one value maps to the same string, the resulting JSON object may have fewer fields than the original map.

  16. trait Parser extends Serializable
  17. final case class ParsingFailure(message: String, underlying: Throwable) extends Error with Product with Serializable

    An exception representing a parsing failure and wrapping the exception provided by the parsing library.

  18. final case class Printer(dropNullValues: Boolean, indent: String, lbraceLeft: String = "", lbraceRight: String = "", rbraceLeft: String = "", rbraceRight: String = "", lbracketLeft: String = "", lbracketRight: String = "", rbracketLeft: String = "", rbracketRight: String = "", lrbracketsEmpty: String = "", arrayCommaLeft: String = "", arrayCommaRight: String = "", objectCommaLeft: String = "", objectCommaRight: String = "", colonLeft: String = "", colonRight: String = "", reuseWriters: Boolean = false, predictSize: Boolean = false, escapeNonAscii: Boolean = false, sortKeys: Boolean = false) extends Product with Serializable

    A pretty-printer for JSON values.

    A pretty-printer for JSON values.

    dropNullValues

    Determines if object fields with values of null are dropped from the output.

    indent

    The indentation to use if any format strings contain a new line.

    lbraceLeft

    Spaces to insert to left of a left brace.

    lbraceRight

    Spaces to insert to right of a left brace.

    rbraceLeft

    Spaces to insert to left of a right brace.

    rbraceRight

    Spaces to insert to right of a right brace.

    lbracketLeft

    Spaces to insert to left of a left bracket.

    lbracketRight

    Spaces to insert to right of a left bracket.

    rbracketLeft

    Spaces to insert to left of a right bracket.

    rbracketRight

    Spaces to insert to right of a right bracket.

    lrbracketsEmpty

    Spaces to insert for an empty array.

    arrayCommaLeft

    Spaces to insert to left of a comma in an array.

    arrayCommaRight

    Spaces to insert to right of a comma in an array.

    objectCommaLeft

    Spaces to insert to left of a comma in an object.

    objectCommaRight

    Spaces to insert to right of a comma in an object.

    colonLeft

    Spaces to insert to left of a colon.

    colonRight

    Spaces to insert to right of a colon.

    reuseWriters

    Determines whether the printer will reuse Appendables via thread-local storage.

    predictSize

    Uses an adaptive size predictor to avoid grow-and-copy steps while printing into a binary output.

    escapeNonAscii

    Unicode-escape any non-ASCII characters in strings.

    sortKeys

    Determines whether the fields should be sorted.

Value Members

  1. object ACursor extends Serializable
  2. object Codec extends ProductCodecs with EnumerationCodecs with Serializable
  3. object CursorOp extends Serializable
  4. object Decoder extends DecoderDerivation with CollectionDecoders with TupleDecoders with ProductDecoders with LiteralDecoders with EnumerationDecoders with LowPriorityDecoders with Serializable

    Utilities and instances for Decoder.

  5. object DecodingFailure extends Serializable
  6. object Encoder extends TupleEncoders with ProductEncoders with LiteralEncoders with EnumerationEncoders with MidPriorityEncoders with Serializable

    Utilities and instances for Encoder.

  7. object Error extends Serializable
  8. object HCursor extends Serializable
  9. object Json extends Serializable
  10. object JsonNumber extends Serializable

    Constructors, type class instances, and other utilities for JsonNumber.

  11. object JsonObject extends Serializable

    Constructors, type class instances, and other utilities for JsonObject.

  12. object KeyDecoder extends Serializable
  13. object KeyEncoder extends Serializable
  14. object ParsingFailure extends Serializable
  15. object Printer extends Serializable
  16. object disjunctionCodecs

    Decoder and Encoder instances for disjunction types with reasonable names for the sides.

Inherited from AnyRef

Inherited from Any

Ungrouped