p

zio

json

package json

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. json
  2. JsonPackagePlatformSpecific
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package ast
  2. package compat
  3. package internal

Type Members

  1. implicit final class DecoderOps extends AnyVal
  2. implicit final class EncoderOps[A] extends AnyVal
  3. trait JsonCodec[A] extends JsonDecoder[A] with JsonEncoder[A]

    A JsonCodec[A] instance has the ability to encode values of type A into JSON, together with the ability to decode such JSON into values of type A.

    A JsonCodec[A] instance has the ability to encode values of type A into JSON, together with the ability to decode such JSON into values of type A.

    The trait is the intersection composition of JsonDecoder[A] and JsonEncoder[A], and instances should satisfy round-tripping laws: that is, for every value, instances must be able to successfully encode the value into JSON, and then successfully decode the same value from such JSON.

    For more information, see JsonDecoder and JsonEncoder.

    {{ val intCodec: JsonCodec[Int] = JsonCodec[Int]

    intCodec.encodeJson(intCodec.encodeJson(42)) == Right(42) }}

  4. trait JsonDecoder[A] extends JsonDecoderPlatformSpecific[A]

    A JsonDecoder[A] instance has the ability to decode JSON to values of type A, potentially failing with an error if the JSON content does not encode a value of the given type.

  5. trait JsonDecoderPlatformSpecific[A] extends AnyRef
  6. trait JsonEncoder[A] extends JsonEncoderPlatformSpecific[A]
  7. trait JsonEncoderPlatformSpecific[A] extends AnyRef
  8. trait JsonFieldDecoder[+A] extends AnyRef

    When decoding a JSON Object, we only allow the keys that implement this interface.

  9. trait JsonFieldEncoder[-A] extends AnyRef

    When encoding a JSON Object, we only allow keys that implement this interface.

  10. implicit final class JsonOps extends AnyVal

    Attemps to decode an already parsed Json AST as an A

  11. sealed trait JsonStreamDelimiter extends AnyRef
  12. final case class jsonDiscriminator(name: String) extends Annotation with Product with Serializable

    If used on a sealed class, will determine the name of the field for disambiguating classes.

    If used on a sealed class, will determine the name of the field for disambiguating classes.

    The default is to not use a typehint field and instead have an object with a single key that is the class name.

    Note that using a discriminator is less performant, uses more memory, and may be prone to DOS attacks that are impossible with the default encoding. In addition, there is slightly less type safety when using custom product encoders (which must write an unenforced object type). Only use this option if you must model an externally defined schema.

  13. final class jsonExclude extends Annotation

    If used on a case class field, will exclude it from the resulting JSON.

  14. final case class jsonField(name: String) extends Annotation with Product with Serializable

    If used on a case class field, determines the name of the JSON field.

    If used on a case class field, determines the name of the JSON field. Defaults to the case class field name.

  15. final case class jsonHint(name: String) extends Annotation with Product with Serializable

    If used on a case class will determine the type hint value for disambiguating sealed traits.

    If used on a case class will determine the type hint value for disambiguating sealed traits. Defaults to the short type name.

  16. final class jsonNoExtraFields extends Annotation

    If used on a case class, will exit early if any fields are in the JSON that do not correspond to field names in the case class.

    If used on a case class, will exit early if any fields are in the JSON that do not correspond to field names in the case class.

    This adds extra protections against a DOS attacks but means that changes in the schema will result in a hard error rather than silently ignoring those fields.

    Cannot be combined with @jsonDiscriminator since it is considered an extra field from the perspective of the case class.

Value Members

  1. object DeriveJsonCodec
  2. object DeriveJsonDecoder
  3. object DeriveJsonEncoder
  4. object JsonCodec extends GeneratedTupleCodecs with CodecLowPriority0
  5. object JsonDecoder extends GeneratedTupleDecoders with DecoderLowPriority0
  6. object JsonEncoder extends GeneratedTupleEncoders with EncoderLowPriority0
  7. object JsonFieldDecoder
  8. object JsonFieldEncoder
  9. object JsonStreamDelimiter

Inherited from AnyRef

Inherited from Any

Ungrouped