zio.json
Members list
Type members
Classlikes
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait JsonMemberFormattrait String => Stringclass Objecttrait Matchableclass AnyShow all
- Self type
-
CamelCase.type
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait JsonMemberFormattrait String => Stringclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
Attributes
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Supertypes
- Self type
-
DeriveJsonCodec.type
Attributes
- Supertypes
-
trait Derivation[JsonDecoder]trait SealedTraitDerivationtrait CommonDerivation[JsonDecoder]class Objecttrait Matchableclass AnyShow all
- Self type
-
DeriveJsonDecoder.type
Attributes
- Supertypes
-
trait Derivation[JsonEncoder]trait SealedTraitDerivationtrait CommonDerivation[JsonEncoder]class Objecttrait Matchableclass AnyShow all
- Self type
-
DeriveJsonEncoder.type
Attributes
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait JsonMemberFormattrait String => Stringclass Objecttrait Matchableclass AnyShow all
- Self type
-
IdentityFormat.type
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.
Instances of this trait 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) }}
Attributes
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.
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.
Attributes
- Companion
- object
- Supertypes
- Self type
-
JsonDecoder[A]
Attributes
- Companion
- trait
- Supertypes
- Self type
-
JsonDecoder.type
Attributes
- Supertypes
- Known subtypes
-
trait JsonDecoder[A]
- Self type
-
JsonDecoder[A]
Attributes
- Companion
- object
- Supertypes
- Self type
-
JsonEncoder[A]
Attributes
- Companion
- trait
- Supertypes
- Self type
-
JsonEncoder.type
Attributes
- Supertypes
- Known subtypes
-
trait JsonEncoder[A]
- Self type
-
JsonEncoder[A]
A JsonError value describes the ways in which decoding could fail. This structure is used to facilitate human-readable error messages during decoding failures.
A JsonError value describes the ways in which decoding could fail. This structure is used to facilitate human-readable error messages during decoding failures.
Attributes
- Companion
- object
- Supertypes
- Known subtypes
When decoding a JSON Object, we only allow the keys that implement this interface.
When decoding a JSON Object, we only allow the keys that implement this interface.
Attributes
- Companion
- object
- Supertypes
- Self type
Attributes
- Companion
- trait
- Supertypes
- Self type
-
JsonFieldDecoder.type
When encoding a JSON Object, we only allow keys that implement this interface.
When encoding a JSON Object, we only allow keys that implement this interface.
Attributes
- Companion
- object
- Supertypes
- Self type
Attributes
- Companion
- trait
- Supertypes
- Self type
-
JsonFieldEncoder.type
Attributes
- Supertypes
- Known subtypes
-
object CamelCaseclass CustomCaseobject IdentityFormatobject KebabCaseobject PascalCaseobject SnakeCaseobject KebabCaseobject SnakeCaseShow all
Attributes
- Companion
- trait
- Supertypes
- Self type
-
JsonStreamDelimiter.type
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait JsonMemberFormattrait String => Stringclass Objecttrait Matchableclass AnyShow all
- Self type
-
KebabCase.type
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait JsonMemberFormattrait String => Stringclass Objecttrait Matchableclass AnyShow all
- Self type
-
PascalCase.type
Attributes
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait JsonMemberFormattrait String => Stringclass Objecttrait Matchableclass AnyShow all
- Self type
-
SnakeCase.type
If used on a case class field, determines the alternative names of the JSON field.
If used on a case class field, determines the alternative names of the JSON field.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Annotationclass Objecttrait Matchableclass AnyShow all
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.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Annotationclass Objecttrait Matchableclass AnyShow all
If used on a case class field, will exclude it from the resulting JSON.
If used on a case class field, will exclude it from the resulting JSON.
Attributes
- Supertypes
Empty option fields will be encoded as null.
Empty option fields will be encoded as null.
Attributes
- Supertypes
If used on a case class field, determines the name of the JSON field. Defaults to the case class field name.
If used on a case class field, determines the name of the JSON field. Defaults to the case class field name.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Annotationclass Objecttrait Matchableclass AnyShow all
If used on a case class will determine the type hint value for disambiguating sealed traits. Defaults to the short type name.
If used on a case class will determine the type hint value for disambiguating sealed traits. Defaults to the short type name.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Annotationclass Objecttrait Matchableclass AnyShow all
If used on a sealed class will determine the strategy of type hint value transformation for disambiguating classes during serialization and deserialization. Same strategies are provided as for jsonMemberNames.
If used on a sealed class will determine the strategy of type hint value transformation for disambiguating classes during serialization and deserialization. Same strategies are provided as for jsonMemberNames.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Annotationclass Objecttrait Matchableclass AnyShow all
If used on a case class, determines the strategy of member names transformation during serialization and deserialization. Four common strategies are provided above and a custom one to support specific use cases.
If used on a case class, determines the strategy of member names transformation during serialization and deserialization. Four common strategies are provided above and a custom one to support specific use cases.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Annotationclass Objecttrait Matchableclass AnyShow all
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.
Attributes
- Supertypes
zio-json version 0.3.0 formats. abc123Def -> abc_123_def
zio-json version 0.3.0 formats. abc123Def -> abc_123_def
Attributes
- Supertypes
- Self type
-
ziojson_03.type