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) }}
- Companion
- object
Value members
Abstract methods
Inherited methods
An alias for JsonDecoder#zipRight.
An alias for JsonDecoder#zipRight.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zipRight.
An alias for JsonDecoder#zipRight.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zipRight.
An alias for JsonDecoder#zipRight.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zipRight.
An alias for JsonDecoder#zipRight.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zipRight.
An alias for JsonDecoder#zipRight.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zipRight.
An alias for JsonDecoder#zipRight.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zipRight.
An alias for JsonDecoder#zipRight.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zipRight.
An alias for JsonDecoder#zipRight.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zipRight.
An alias for JsonDecoder#zipRight.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zipLeft.
An alias for JsonDecoder#zipLeft.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zipLeft.
An alias for JsonDecoder#zipLeft.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zipLeft.
An alias for JsonDecoder#zipLeft.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zipLeft.
An alias for JsonDecoder#zipLeft.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zipLeft.
An alias for JsonDecoder#zipLeft.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zipLeft.
An alias for JsonDecoder#zipLeft.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zipLeft.
An alias for JsonDecoder#zipLeft.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zipLeft.
An alias for JsonDecoder#zipLeft.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zipLeft.
An alias for JsonDecoder#zipLeft.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zip.
An alias for JsonDecoder#zip.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zip.
An alias for JsonDecoder#zip.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zip.
An alias for JsonDecoder#zip.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zip.
An alias for JsonDecoder#zip.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zip.
An alias for JsonDecoder#zip.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zip.
An alias for JsonDecoder#zip.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zip.
An alias for JsonDecoder#zip.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zip.
An alias for JsonDecoder#zip.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#zip.
An alias for JsonDecoder#zip.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#orElseEither.
An alias for JsonDecoder#orElseEither.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#orElseEither.
An alias for JsonDecoder#orElseEither.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#orElseEither.
An alias for JsonDecoder#orElseEither.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#orElseEither.
An alias for JsonDecoder#orElseEither.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#orElseEither.
An alias for JsonDecoder#orElseEither.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#orElseEither.
An alias for JsonDecoder#orElseEither.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#orElseEither.
An alias for JsonDecoder#orElseEither.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#orElseEither.
An alias for JsonDecoder#orElseEither.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#orElseEither.
An alias for JsonDecoder#orElseEither.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#orElseEither.
An alias for JsonDecoder#orElseEither.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#orElse.
An alias for JsonDecoder#orElse.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#orElse.
An alias for JsonDecoder#orElse.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#orElse.
An alias for JsonDecoder#orElse.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#orElse.
An alias for JsonDecoder#orElse.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#orElse.
An alias for JsonDecoder#orElse.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#orElse.
An alias for JsonDecoder#orElse.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#orElse.
An alias for JsonDecoder#orElse.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#orElse.
An alias for JsonDecoder#orElse.
- Inherited from
- JsonDecoder
An alias for JsonDecoder#orElse.
An alias for JsonDecoder#orElse.
- Inherited from
- JsonDecoder
Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.
Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.
- Inherited from
- JsonEncoder
Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.
Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.
- Inherited from
- JsonEncoder
Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.
Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.
- Inherited from
- JsonEncoder
Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.
Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.
- Inherited from
- JsonEncoder
Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.
Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.
- Inherited from
- JsonEncoder
Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.
Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.
- Inherited from
- JsonEncoder
Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.
Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.
- Inherited from
- JsonEncoder
Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.
Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.
- Inherited from
- JsonEncoder
Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.
Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.
- Inherited from
- JsonEncoder
Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.
Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.
- Inherited from
- JsonEncoder
Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.
Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.
- Inherited from
- JsonEncoder
Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.
Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.
- Inherited from
- JsonEncoder
Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.
Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.
- Inherited from
- JsonEncoder
Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.
Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.
- Inherited from
- JsonEncoder
Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.
Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.
- Inherited from
- JsonEncoder
Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.
Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.
- Inherited from
- JsonEncoder
Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.
Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.
- Inherited from
- JsonEncoder
Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.
Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.
- Inherited from
- JsonEncoder
Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.
Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.
- Inherited from
- JsonEncoder
Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.
Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.
- Inherited from
- JsonEncoder
Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.
Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.
- Inherited from
- JsonEncoder
Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.
Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.
- Inherited from
- JsonEncoder
Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.
Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.
- Inherited from
- JsonEncoder
Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.
Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.
- Inherited from
- JsonEncoder
Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.
Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.
- Inherited from
- JsonEncoder
Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.
Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.
- Inherited from
- JsonEncoder
Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.
Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.
- Inherited from
- JsonEncoder
Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.
Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.
- Inherited from
- JsonEncoder
Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.
Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.
- Inherited from
- JsonEncoder
Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.
Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.
- Inherited from
- JsonEncoder
Attempts to decode a value of type A
from the specified CharSequence
, but may fail with
a human-readable error message if the provided text does not encode a value of this type.
Attempts to decode a value of type A
from the specified CharSequence
, but may fail with
a human-readable error message if the provided text does not encode a value of this type.
Note: This method may not entirely consume the specified character sequence.
- Inherited from
- JsonDecoder
Attempts to decode a value of type A
from the specified CharSequence
, but may fail with
a human-readable error message if the provided text does not encode a value of this type.
Attempts to decode a value of type A
from the specified CharSequence
, but may fail with
a human-readable error message if the provided text does not encode a value of this type.
Note: This method may not entirely consume the specified character sequence.
- Inherited from
- JsonDecoder
Attempts to decode a value of type A
from the specified CharSequence
, but may fail with
a human-readable error message if the provided text does not encode a value of this type.
Attempts to decode a value of type A
from the specified CharSequence
, but may fail with
a human-readable error message if the provided text does not encode a value of this type.
Note: This method may not entirely consume the specified character sequence.
- Inherited from
- JsonDecoder
Attempts to decode a value of type A
from the specified CharSequence
, but may fail with
a human-readable error message if the provided text does not encode a value of this type.
Attempts to decode a value of type A
from the specified CharSequence
, but may fail with
a human-readable error message if the provided text does not encode a value of this type.
Note: This method may not entirely consume the specified character sequence.
- Inherited from
- JsonDecoder
Attempts to decode a value of type A
from the specified CharSequence
, but may fail with
a human-readable error message if the provided text does not encode a value of this type.
Attempts to decode a value of type A
from the specified CharSequence
, but may fail with
a human-readable error message if the provided text does not encode a value of this type.
Note: This method may not entirely consume the specified character sequence.
- Inherited from
- JsonDecoder
Attempts to decode a value of type A
from the specified CharSequence
, but may fail with
a human-readable error message if the provided text does not encode a value of this type.
Attempts to decode a value of type A
from the specified CharSequence
, but may fail with
a human-readable error message if the provided text does not encode a value of this type.
Note: This method may not entirely consume the specified character sequence.
- Inherited from
- JsonDecoder
Attempts to decode a value of type A
from the specified CharSequence
, but may fail with
a human-readable error message if the provided text does not encode a value of this type.
Attempts to decode a value of type A
from the specified CharSequence
, but may fail with
a human-readable error message if the provided text does not encode a value of this type.
Note: This method may not entirely consume the specified character sequence.
- Inherited from
- JsonDecoder
Attempts to decode a value of type A
from the specified CharSequence
, but may fail with
a human-readable error message if the provided text does not encode a value of this type.
Attempts to decode a value of type A
from the specified CharSequence
, but may fail with
a human-readable error message if the provided text does not encode a value of this type.
Note: This method may not entirely consume the specified character sequence.
- Inherited from
- JsonDecoder
Attempts to decode a value of type A
from the specified CharSequence
, but may fail with
a human-readable error message if the provided text does not encode a value of this type.
Attempts to decode a value of type A
from the specified CharSequence
, but may fail with
a human-readable error message if the provided text does not encode a value of this type.
Note: This method may not entirely consume the specified character sequence.
- Inherited from
- JsonDecoder
Attempts to decode a value of type A
from the specified CharSequence
, but may fail with
a human-readable error message if the provided text does not encode a value of this type.
Attempts to decode a value of type A
from the specified CharSequence
, but may fail with
a human-readable error message if the provided text does not encode a value of this type.
Note: This method may not entirely consume the specified character sequence.
- Inherited from
- JsonDecoder
Attempts to decode a stream of characters into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Attempts to decode a stream of characters into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Note: This method may not consume the full string.
- See also
- Inherited from
- JsonDecoderPlatformSpecific
Attempts to decode a stream of characters into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Attempts to decode a stream of characters into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Note: This method may not consume the full string.
- See also
- Inherited from
- JsonDecoderPlatformSpecific
Attempts to decode a stream of characters into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Attempts to decode a stream of characters into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Note: This method may not consume the full string.
- See also
- Inherited from
- JsonDecoderPlatformSpecific
Attempts to decode a stream of characters into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Attempts to decode a stream of characters into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Note: This method may not consume the full string.
- See also
- Inherited from
- JsonDecoderPlatformSpecific
Attempts to decode a stream of characters into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Attempts to decode a stream of characters into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Note: This method may not consume the full string.
- See also
- Inherited from
- JsonDecoderPlatformSpecific
Attempts to decode a stream of characters into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Attempts to decode a stream of characters into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Note: This method may not consume the full string.
- See also
- Inherited from
- JsonDecoderPlatformSpecific
Attempts to decode a stream of characters into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Attempts to decode a stream of characters into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Note: This method may not consume the full string.
- See also
- Inherited from
- JsonDecoderPlatformSpecific
Attempts to decode a stream of characters into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Attempts to decode a stream of characters into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Note: This method may not consume the full string.
- See also
- Inherited from
- JsonDecoderPlatformSpecific
Attempts to decode a stream of characters into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Attempts to decode a stream of characters into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Note: This method may not consume the full string.
- See also
- Inherited from
- JsonDecoderPlatformSpecific
Attempts to decode a stream of characters into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Attempts to decode a stream of characters into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Note: This method may not consume the full string.
- See also
- Inherited from
- JsonDecoderPlatformSpecific
Attempts to decode a stream of bytes using the user supplied Charset into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Attempts to decode a stream of bytes using the user supplied Charset into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Note: This method may not consume the full string.
- See also
decodeJsonStream For a
Char
stream variant- Inherited from
- JsonDecoderPlatformSpecific
Attempts to decode a stream of bytes using the user supplied Charset into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Attempts to decode a stream of bytes using the user supplied Charset into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Note: This method may not consume the full string.
- See also
decodeJsonStream For a
Char
stream variant- Inherited from
- JsonDecoderPlatformSpecific
Attempts to decode a stream of bytes using the user supplied Charset into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Attempts to decode a stream of bytes using the user supplied Charset into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Note: This method may not consume the full string.
- See also
decodeJsonStream For a
Char
stream variant- Inherited from
- JsonDecoderPlatformSpecific
Attempts to decode a stream of bytes using the user supplied Charset into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Attempts to decode a stream of bytes using the user supplied Charset into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Note: This method may not consume the full string.
- See also
decodeJsonStream For a
Char
stream variant- Inherited from
- JsonDecoderPlatformSpecific
Attempts to decode a stream of bytes using the user supplied Charset into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Attempts to decode a stream of bytes using the user supplied Charset into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Note: This method may not consume the full string.
- See also
decodeJsonStream For a
Char
stream variant- Inherited from
- JsonDecoderPlatformSpecific
Attempts to decode a stream of bytes using the user supplied Charset into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Attempts to decode a stream of bytes using the user supplied Charset into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Note: This method may not consume the full string.
- See also
decodeJsonStream For a
Char
stream variant- Inherited from
- JsonDecoderPlatformSpecific
Attempts to decode a stream of bytes using the user supplied Charset into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Attempts to decode a stream of bytes using the user supplied Charset into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Note: This method may not consume the full string.
- See also
decodeJsonStream For a
Char
stream variant- Inherited from
- JsonDecoderPlatformSpecific
Attempts to decode a stream of bytes using the user supplied Charset into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Attempts to decode a stream of bytes using the user supplied Charset into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Note: This method may not consume the full string.
- See also
decodeJsonStream For a
Char
stream variant- Inherited from
- JsonDecoderPlatformSpecific
Attempts to decode a stream of bytes using the user supplied Charset into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Attempts to decode a stream of bytes using the user supplied Charset into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Note: This method may not consume the full string.
- See also
decodeJsonStream For a
Char
stream variant- Inherited from
- JsonDecoderPlatformSpecific
Attempts to decode a stream of bytes using the user supplied Charset into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Attempts to decode a stream of bytes using the user supplied Charset into a single value of type A
, but may fail with
a human-readable exception if the stream does not encode a value of this type.
Note: This method may not consume the full string.
- See also
decodeJsonStream For a
Char
stream variant- Inherited from
- JsonDecoderPlatformSpecific
- Inherited from
- JsonDecoderPlatformSpecific
- Inherited from
- JsonDecoderPlatformSpecific
- Inherited from
- JsonDecoderPlatformSpecific
- Inherited from
- JsonDecoderPlatformSpecific
- Inherited from
- JsonDecoderPlatformSpecific
- Inherited from
- JsonDecoderPlatformSpecific
- Inherited from
- JsonDecoderPlatformSpecific
- Inherited from
- JsonDecoderPlatformSpecific
- Inherited from
- JsonDecoderPlatformSpecific
- Inherited from
- JsonDecoderPlatformSpecific
Returns a new encoder that can accepts an Either[A, B]
to either, and uses either this
encoder or the specified encoder to encode the two different types of values.
Returns a new encoder that can accepts an Either[A, B]
to either, and uses either this
encoder or the specified encoder to encode the two different types of values.
- Inherited from
- JsonEncoder
Returns a new encoder that can accepts an Either[A, B]
to either, and uses either this
encoder or the specified encoder to encode the two different types of values.
Returns a new encoder that can accepts an Either[A, B]
to either, and uses either this
encoder or the specified encoder to encode the two different types of values.
- Inherited from
- JsonEncoder
Returns a new encoder that can accepts an Either[A, B]
to either, and uses either this
encoder or the specified encoder to encode the two different types of values.
Returns a new encoder that can accepts an Either[A, B]
to either, and uses either this
encoder or the specified encoder to encode the two different types of values.
- Inherited from
- JsonEncoder
Returns a new encoder that can accepts an Either[A, B]
to either, and uses either this
encoder or the specified encoder to encode the two different types of values.
Returns a new encoder that can accepts an Either[A, B]
to either, and uses either this
encoder or the specified encoder to encode the two different types of values.
- Inherited from
- JsonEncoder
Returns a new encoder that can accepts an Either[A, B]
to either, and uses either this
encoder or the specified encoder to encode the two different types of values.
Returns a new encoder that can accepts an Either[A, B]
to either, and uses either this
encoder or the specified encoder to encode the two different types of values.
- Inherited from
- JsonEncoder
Returns a new encoder that can accepts an Either[A, B]
to either, and uses either this
encoder or the specified encoder to encode the two different types of values.
Returns a new encoder that can accepts an Either[A, B]
to either, and uses either this
encoder or the specified encoder to encode the two different types of values.
- Inherited from
- JsonEncoder
Returns a new encoder that can accepts an Either[A, B]
to either, and uses either this
encoder or the specified encoder to encode the two different types of values.
Returns a new encoder that can accepts an Either[A, B]
to either, and uses either this
encoder or the specified encoder to encode the two different types of values.
- Inherited from
- JsonEncoder
Returns a new encoder that can accepts an Either[A, B]
to either, and uses either this
encoder or the specified encoder to encode the two different types of values.
Returns a new encoder that can accepts an Either[A, B]
to either, and uses either this
encoder or the specified encoder to encode the two different types of values.
- Inherited from
- JsonEncoder
Returns a new encoder that can accepts an Either[A, B]
to either, and uses either this
encoder or the specified encoder to encode the two different types of values.
Returns a new encoder that can accepts an Either[A, B]
to either, and uses either this
encoder or the specified encoder to encode the two different types of values.
- Inherited from
- JsonEncoder
Returns a new encoder that can accepts an Either[A, B]
to either, and uses either this
encoder or the specified encoder to encode the two different types of values.
Returns a new encoder that can accepts an Either[A, B]
to either, and uses either this
encoder or the specified encoder to encode the two different types of values.
- Inherited from
- JsonEncoder
Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.
Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.
- Inherited from
- JsonEncoder
Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.
Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.
- Inherited from
- JsonEncoder
Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.
Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.
- Inherited from
- JsonEncoder
Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.
Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.
- Inherited from
- JsonEncoder
Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.
Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.
- Inherited from
- JsonEncoder
Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.
Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.
- Inherited from
- JsonEncoder
Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.
Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.
- Inherited from
- JsonEncoder
Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.
Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.
- Inherited from
- JsonEncoder
Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.
Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.
- Inherited from
- JsonEncoder
Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.
Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.
- Inherited from
- JsonEncoder
Encodes the specified value into a JSON string, with the specified indentation level.
Encodes the specified value into a JSON string, with the specified indentation level.
- Inherited from
- JsonEncoder
Encodes the specified value into a JSON string, with the specified indentation level.
Encodes the specified value into a JSON string, with the specified indentation level.
- Inherited from
- JsonEncoder
Encodes the specified value into a JSON string, with the specified indentation level.
Encodes the specified value into a JSON string, with the specified indentation level.
- Inherited from
- JsonEncoder
Encodes the specified value into a JSON string, with the specified indentation level.
Encodes the specified value into a JSON string, with the specified indentation level.
- Inherited from
- JsonEncoder
Encodes the specified value into a JSON string, with the specified indentation level.
Encodes the specified value into a JSON string, with the specified indentation level.
- Inherited from
- JsonEncoder
Encodes the specified value into a JSON string, with the specified indentation level.
Encodes the specified value into a JSON string, with the specified indentation level.
- Inherited from
- JsonEncoder
Encodes the specified value into a JSON string, with the specified indentation level.
Encodes the specified value into a JSON string, with the specified indentation level.
- Inherited from
- JsonEncoder
Encodes the specified value into a JSON string, with the specified indentation level.
Encodes the specified value into a JSON string, with the specified indentation level.
- Inherited from
- JsonEncoder
Encodes the specified value into a JSON string, with the specified indentation level.
Encodes the specified value into a JSON string, with the specified indentation level.
- Inherited from
- JsonEncoder
Encodes the specified value into a JSON string, with the specified indentation level.
Encodes the specified value into a JSON string, with the specified indentation level.
- Inherited from
- JsonEncoder
Encodes the specified value into a character stream.
Encodes the specified value into a character stream.
- Inherited from
- JsonEncoderPlatformSpecific
Encodes the specified value into a character stream.
Encodes the specified value into a character stream.
- Inherited from
- JsonEncoderPlatformSpecific
Encodes the specified value into a character stream.
Encodes the specified value into a character stream.
- Inherited from
- JsonEncoderPlatformSpecific
Encodes the specified value into a character stream.
Encodes the specified value into a character stream.
- Inherited from
- JsonEncoderPlatformSpecific
Encodes the specified value into a character stream.
Encodes the specified value into a character stream.
- Inherited from
- JsonEncoderPlatformSpecific
Encodes the specified value into a character stream.
Encodes the specified value into a character stream.
- Inherited from
- JsonEncoderPlatformSpecific
Encodes the specified value into a character stream.
Encodes the specified value into a character stream.
- Inherited from
- JsonEncoderPlatformSpecific
Encodes the specified value into a character stream.
Encodes the specified value into a character stream.
- Inherited from
- JsonEncoderPlatformSpecific
Encodes the specified value into a character stream.
Encodes the specified value into a character stream.
- Inherited from
- JsonEncoderPlatformSpecific
Encodes the specified value into a character stream.
Encodes the specified value into a character stream.
- Inherited from
- JsonEncoderPlatformSpecific
Decode a value from an already parsed Json AST.
Decode a value from an already parsed Json AST.
The default implementation encodes the Json to a byte stream and uses decode to parse that. Override to provide a more performant implementation.
- Inherited from
- JsonDecoder
Decode a value from an already parsed Json AST.
Decode a value from an already parsed Json AST.
The default implementation encodes the Json to a byte stream and uses decode to parse that. Override to provide a more performant implementation.
- Inherited from
- JsonDecoder
Decode a value from an already parsed Json AST.
Decode a value from an already parsed Json AST.
The default implementation encodes the Json to a byte stream and uses decode to parse that. Override to provide a more performant implementation.
- Inherited from
- JsonDecoder
Decode a value from an already parsed Json AST.
Decode a value from an already parsed Json AST.
The default implementation encodes the Json to a byte stream and uses decode to parse that. Override to provide a more performant implementation.
- Inherited from
- JsonDecoder
Decode a value from an already parsed Json AST.
Decode a value from an already parsed Json AST.
The default implementation encodes the Json to a byte stream and uses decode to parse that. Override to provide a more performant implementation.
- Inherited from
- JsonDecoder
Decode a value from an already parsed Json AST.
Decode a value from an already parsed Json AST.
The default implementation encodes the Json to a byte stream and uses decode to parse that. Override to provide a more performant implementation.
- Inherited from
- JsonDecoder
Decode a value from an already parsed Json AST.
Decode a value from an already parsed Json AST.
The default implementation encodes the Json to a byte stream and uses decode to parse that. Override to provide a more performant implementation.
- Inherited from
- JsonDecoder
Decode a value from an already parsed Json AST.
Decode a value from an already parsed Json AST.
The default implementation encodes the Json to a byte stream and uses decode to parse that. Override to provide a more performant implementation.
- Inherited from
- JsonDecoder
Decode a value from an already parsed Json AST.
Decode a value from an already parsed Json AST.
The default implementation encodes the Json to a byte stream and uses decode to parse that. Override to provide a more performant implementation.
- Inherited from
- JsonDecoder
Decode a value from an already parsed Json AST.
Decode a value from an already parsed Json AST.
The default implementation encodes the Json to a byte stream and uses decode to parse that. Override to provide a more performant implementation.
- Inherited from
- JsonDecoder
This default may be overriden when this value may be missing within a JSON object and still be encoded.
This default may be overriden when this value may be missing within a JSON object and still be encoded.
- Inherited from
- JsonEncoder
This default may be overriden when this value may be missing within a JSON object and still be encoded.
This default may be overriden when this value may be missing within a JSON object and still be encoded.
- Inherited from
- JsonEncoder
This default may be overriden when this value may be missing within a JSON object and still be encoded.
This default may be overriden when this value may be missing within a JSON object and still be encoded.
- Inherited from
- JsonEncoder
This default may be overriden when this value may be missing within a JSON object and still be encoded.
This default may be overriden when this value may be missing within a JSON object and still be encoded.
- Inherited from
- JsonEncoder
This default may be overriden when this value may be missing within a JSON object and still be encoded.
This default may be overriden when this value may be missing within a JSON object and still be encoded.
- Inherited from
- JsonEncoder
This default may be overriden when this value may be missing within a JSON object and still be encoded.
This default may be overriden when this value may be missing within a JSON object and still be encoded.
- Inherited from
- JsonEncoder
This default may be overriden when this value may be missing within a JSON object and still be encoded.
This default may be overriden when this value may be missing within a JSON object and still be encoded.
- Inherited from
- JsonEncoder
This default may be overriden when this value may be missing within a JSON object and still be encoded.
This default may be overriden when this value may be missing within a JSON object and still be encoded.
- Inherited from
- JsonEncoder
This default may be overriden when this value may be missing within a JSON object and still be encoded.
This default may be overriden when this value may be missing within a JSON object and still be encoded.
- Inherited from
- JsonEncoder
This default may be overriden when this value may be missing within a JSON object and still be encoded.
This default may be overriden when this value may be missing within a JSON object and still be encoded.
- Inherited from
- JsonEncoder
Returns a new codec whose decoded values will be mapped by the specified function.
Returns a new codec whose decoded values will be mapped by the specified function.
- Inherited from
- JsonDecoder
Returns a new codec whose decoded values will be mapped by the specified function.
Returns a new codec whose decoded values will be mapped by the specified function.
- Inherited from
- JsonDecoder
Returns a new codec whose decoded values will be mapped by the specified function.
Returns a new codec whose decoded values will be mapped by the specified function.
- Inherited from
- JsonDecoder
Returns a new codec whose decoded values will be mapped by the specified function.
Returns a new codec whose decoded values will be mapped by the specified function.
- Inherited from
- JsonDecoder
Returns a new codec whose decoded values will be mapped by the specified function.
Returns a new codec whose decoded values will be mapped by the specified function.
- Inherited from
- JsonDecoder
Returns a new codec whose decoded values will be mapped by the specified function.
Returns a new codec whose decoded values will be mapped by the specified function.
- Inherited from
- JsonDecoder
Returns a new codec whose decoded values will be mapped by the specified function.
Returns a new codec whose decoded values will be mapped by the specified function.
- Inherited from
- JsonDecoder
Returns a new codec whose decoded values will be mapped by the specified function.
Returns a new codec whose decoded values will be mapped by the specified function.
- Inherited from
- JsonDecoder
Returns a new codec whose decoded values will be mapped by the specified function.
Returns a new codec whose decoded values will be mapped by the specified function.
- Inherited from
- JsonDecoder
Returns a new codec whose decoded values will be mapped by the specified function.
Returns a new codec whose decoded values will be mapped by the specified function.
- Inherited from
- JsonDecoder
Returns a new codec whose decoded values will be mapped by the specified function, which may itself decide to fail with some type of error.
Returns a new codec whose decoded values will be mapped by the specified function, which may itself decide to fail with some type of error.
- Inherited from
- JsonDecoder
Returns a new codec whose decoded values will be mapped by the specified function, which may itself decide to fail with some type of error.
Returns a new codec whose decoded values will be mapped by the specified function, which may itself decide to fail with some type of error.
- Inherited from
- JsonDecoder
Returns a new codec whose decoded values will be mapped by the specified function, which may itself decide to fail with some type of error.
Returns a new codec whose decoded values will be mapped by the specified function, which may itself decide to fail with some type of error.
- Inherited from
- JsonDecoder
Returns a new codec whose decoded values will be mapped by the specified function, which may itself decide to fail with some type of error.
Returns a new codec whose decoded values will be mapped by the specified function, which may itself decide to fail with some type of error.
- Inherited from
- JsonDecoder
Returns a new codec whose decoded values will be mapped by the specified function, which may itself decide to fail with some type of error.
Returns a new codec whose decoded values will be mapped by the specified function, which may itself decide to fail with some type of error.
- Inherited from
- JsonDecoder
Returns a new codec whose decoded values will be mapped by the specified function, which may itself decide to fail with some type of error.
Returns a new codec whose decoded values will be mapped by the specified function, which may itself decide to fail with some type of error.
- Inherited from
- JsonDecoder
Returns a new codec whose decoded values will be mapped by the specified function, which may itself decide to fail with some type of error.
Returns a new codec whose decoded values will be mapped by the specified function, which may itself decide to fail with some type of error.
- Inherited from
- JsonDecoder
Returns a new codec whose decoded values will be mapped by the specified function, which may itself decide to fail with some type of error.
Returns a new codec whose decoded values will be mapped by the specified function, which may itself decide to fail with some type of error.
- Inherited from
- JsonDecoder
Returns a new codec whose decoded values will be mapped by the specified function, which may itself decide to fail with some type of error.
Returns a new codec whose decoded values will be mapped by the specified function, which may itself decide to fail with some type of error.
- Inherited from
- JsonDecoder
Returns a new codec whose decoded values will be mapped by the specified function, which may itself decide to fail with some type of error.
Returns a new codec whose decoded values will be mapped by the specified function, which may itself decide to fail with some type of error.
- Inherited from
- JsonDecoder
Returns this encoder but narrowed to the its given sub-type
Returns this encoder but narrowed to the its given sub-type
- Inherited from
- JsonEncoder
Returns this encoder but narrowed to the its given sub-type
Returns this encoder but narrowed to the its given sub-type
- Inherited from
- JsonEncoder
Returns this encoder but narrowed to the its given sub-type
Returns this encoder but narrowed to the its given sub-type
- Inherited from
- JsonEncoder
Returns this encoder but narrowed to the its given sub-type
Returns this encoder but narrowed to the its given sub-type
- Inherited from
- JsonEncoder
Returns this encoder but narrowed to the its given sub-type
Returns this encoder but narrowed to the its given sub-type
- Inherited from
- JsonEncoder
Returns this encoder but narrowed to the its given sub-type
Returns this encoder but narrowed to the its given sub-type
- Inherited from
- JsonEncoder
Returns this encoder but narrowed to the its given sub-type
Returns this encoder but narrowed to the its given sub-type
- Inherited from
- JsonEncoder
Returns this encoder but narrowed to the its given sub-type
Returns this encoder but narrowed to the its given sub-type
- Inherited from
- JsonEncoder
Returns this encoder but narrowed to the its given sub-type
Returns this encoder but narrowed to the its given sub-type
- Inherited from
- JsonEncoder
Returns this encoder but narrowed to the its given sub-type
Returns this encoder but narrowed to the its given sub-type
- Inherited from
- JsonEncoder
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead. This method may be unsafe from a security perspective: it can use more memory than hand coded alternative and so lead to DOS.
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead. This method may be unsafe from a security perspective: it can use more memory than hand coded alternative and so lead to DOS.
For example, in the case of an alternative between Int
and Boolean
, a hand coded
alternative would look like:
val decoder: JsonDecoder[AnyVal] = JsonDecoder.peekChar[AnyVal] {
case 't' | 'f' => JsonDecoder[Boolean].widen
case c => JsonDecoder[Int].widen
}
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead. This method may be unsafe from a security perspective: it can use more memory than hand coded alternative and so lead to DOS.
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead. This method may be unsafe from a security perspective: it can use more memory than hand coded alternative and so lead to DOS.
For example, in the case of an alternative between Int
and Boolean
, a hand coded
alternative would look like:
val decoder: JsonDecoder[AnyVal] = JsonDecoder.peekChar[AnyVal] {
case 't' | 'f' => JsonDecoder[Boolean].widen
case c => JsonDecoder[Int].widen
}
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead. This method may be unsafe from a security perspective: it can use more memory than hand coded alternative and so lead to DOS.
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead. This method may be unsafe from a security perspective: it can use more memory than hand coded alternative and so lead to DOS.
For example, in the case of an alternative between Int
and Boolean
, a hand coded
alternative would look like:
val decoder: JsonDecoder[AnyVal] = JsonDecoder.peekChar[AnyVal] {
case 't' | 'f' => JsonDecoder[Boolean].widen
case c => JsonDecoder[Int].widen
}
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead. This method may be unsafe from a security perspective: it can use more memory than hand coded alternative and so lead to DOS.
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead. This method may be unsafe from a security perspective: it can use more memory than hand coded alternative and so lead to DOS.
For example, in the case of an alternative between Int
and Boolean
, a hand coded
alternative would look like:
val decoder: JsonDecoder[AnyVal] = JsonDecoder.peekChar[AnyVal] {
case 't' | 'f' => JsonDecoder[Boolean].widen
case c => JsonDecoder[Int].widen
}
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead. This method may be unsafe from a security perspective: it can use more memory than hand coded alternative and so lead to DOS.
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead. This method may be unsafe from a security perspective: it can use more memory than hand coded alternative and so lead to DOS.
For example, in the case of an alternative between Int
and Boolean
, a hand coded
alternative would look like:
val decoder: JsonDecoder[AnyVal] = JsonDecoder.peekChar[AnyVal] {
case 't' | 'f' => JsonDecoder[Boolean].widen
case c => JsonDecoder[Int].widen
}
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead. This method may be unsafe from a security perspective: it can use more memory than hand coded alternative and so lead to DOS.
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead. This method may be unsafe from a security perspective: it can use more memory than hand coded alternative and so lead to DOS.
For example, in the case of an alternative between Int
and Boolean
, a hand coded
alternative would look like:
val decoder: JsonDecoder[AnyVal] = JsonDecoder.peekChar[AnyVal] {
case 't' | 'f' => JsonDecoder[Boolean].widen
case c => JsonDecoder[Int].widen
}
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead. This method may be unsafe from a security perspective: it can use more memory than hand coded alternative and so lead to DOS.
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead. This method may be unsafe from a security perspective: it can use more memory than hand coded alternative and so lead to DOS.
For example, in the case of an alternative between Int
and Boolean
, a hand coded
alternative would look like:
val decoder: JsonDecoder[AnyVal] = JsonDecoder.peekChar[AnyVal] {
case 't' | 'f' => JsonDecoder[Boolean].widen
case c => JsonDecoder[Int].widen
}
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead. This method may be unsafe from a security perspective: it can use more memory than hand coded alternative and so lead to DOS.
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead. This method may be unsafe from a security perspective: it can use more memory than hand coded alternative and so lead to DOS.
For example, in the case of an alternative between Int
and Boolean
, a hand coded
alternative would look like:
val decoder: JsonDecoder[AnyVal] = JsonDecoder.peekChar[AnyVal] {
case 't' | 'f' => JsonDecoder[Boolean].widen
case c => JsonDecoder[Int].widen
}
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead. This method may be unsafe from a security perspective: it can use more memory than hand coded alternative and so lead to DOS.
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead. This method may be unsafe from a security perspective: it can use more memory than hand coded alternative and so lead to DOS.
For example, in the case of an alternative between Int
and Boolean
, a hand coded
alternative would look like:
val decoder: JsonDecoder[AnyVal] = JsonDecoder.peekChar[AnyVal] {
case 't' | 'f' => JsonDecoder[Boolean].widen
case c => JsonDecoder[Int].widen
}
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead. This method may be unsafe from a security perspective: it can use more memory than hand coded alternative and so lead to DOS.
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead. This method may be unsafe from a security perspective: it can use more memory than hand coded alternative and so lead to DOS.
For example, in the case of an alternative between Int
and Boolean
, a hand coded
alternative would look like:
val decoder: JsonDecoder[AnyVal] = JsonDecoder.peekChar[AnyVal] {
case 't' | 'f' => JsonDecoder[Boolean].widen
case c => JsonDecoder[Int].widen
}
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead.
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead.
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead.
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead.
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead.
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead.
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead.
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead.
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead.
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead.
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead.
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead.
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead.
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead.
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead.
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead.
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead.
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead.
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead.
Returns a new codec that combines this codec and the specified codec using fallback semantics: such that if this codec fails, the specified codec will be tried instead.
- Inherited from
- JsonDecoder
Converts a value to a Json AST
Converts a value to a Json AST
The default implementation encodes the value to a Json byte stream and uses decode to parse that back to an AST. Override to provide a more performant implementation.
- Inherited from
- JsonEncoder
Converts a value to a Json AST
Converts a value to a Json AST
The default implementation encodes the value to a Json byte stream and uses decode to parse that back to an AST. Override to provide a more performant implementation.
- Inherited from
- JsonEncoder
Converts a value to a Json AST
Converts a value to a Json AST
The default implementation encodes the value to a Json byte stream and uses decode to parse that back to an AST. Override to provide a more performant implementation.
- Inherited from
- JsonEncoder
Converts a value to a Json AST
Converts a value to a Json AST
The default implementation encodes the value to a Json byte stream and uses decode to parse that back to an AST. Override to provide a more performant implementation.
- Inherited from
- JsonEncoder
Converts a value to a Json AST
Converts a value to a Json AST
The default implementation encodes the value to a Json byte stream and uses decode to parse that back to an AST. Override to provide a more performant implementation.
- Inherited from
- JsonEncoder
Converts a value to a Json AST
Converts a value to a Json AST
The default implementation encodes the value to a Json byte stream and uses decode to parse that back to an AST. Override to provide a more performant implementation.
- Inherited from
- JsonEncoder
Converts a value to a Json AST
Converts a value to a Json AST
The default implementation encodes the value to a Json byte stream and uses decode to parse that back to an AST. Override to provide a more performant implementation.
- Inherited from
- JsonEncoder
Converts a value to a Json AST
Converts a value to a Json AST
The default implementation encodes the value to a Json byte stream and uses decode to parse that back to an AST. Override to provide a more performant implementation.
- Inherited from
- JsonEncoder
Converts a value to a Json AST
Converts a value to a Json AST
The default implementation encodes the value to a Json byte stream and uses decode to parse that back to an AST. Override to provide a more performant implementation.
- Inherited from
- JsonEncoder
Converts a value to a Json AST
Converts a value to a Json AST
The default implementation encodes the value to a Json byte stream and uses decode to parse that back to an AST. Override to provide a more performant implementation.
- Inherited from
- JsonEncoder
Low-level, unsafe method to decode a value or throw an exception. This method should not be called in application code, although it can be implemented for user-defined data structures.
Low-level, unsafe method to decode a value or throw an exception. This method should not be called in application code, although it can be implemented for user-defined data structures.
- Inherited from
- JsonDecoder
Low-level, unsafe method to decode a value or throw an exception. This method should not be called in application code, although it can be implemented for user-defined data structures.
Low-level, unsafe method to decode a value or throw an exception. This method should not be called in application code, although it can be implemented for user-defined data structures.
- Inherited from
- JsonDecoder
Low-level, unsafe method to decode a value or throw an exception. This method should not be called in application code, although it can be implemented for user-defined data structures.
Low-level, unsafe method to decode a value or throw an exception. This method should not be called in application code, although it can be implemented for user-defined data structures.
- Inherited from
- JsonDecoder
Low-level, unsafe method to decode a value or throw an exception. This method should not be called in application code, although it can be implemented for user-defined data structures.
Low-level, unsafe method to decode a value or throw an exception. This method should not be called in application code, although it can be implemented for user-defined data structures.
- Inherited from
- JsonDecoder
Low-level, unsafe method to decode a value or throw an exception. This method should not be called in application code, although it can be implemented for user-defined data structures.
Low-level, unsafe method to decode a value or throw an exception. This method should not be called in application code, although it can be implemented for user-defined data structures.
- Inherited from
- JsonDecoder
Low-level, unsafe method to decode a value or throw an exception. This method should not be called in application code, although it can be implemented for user-defined data structures.
Low-level, unsafe method to decode a value or throw an exception. This method should not be called in application code, although it can be implemented for user-defined data structures.
- Inherited from
- JsonDecoder
Low-level, unsafe method to decode a value or throw an exception. This method should not be called in application code, although it can be implemented for user-defined data structures.
Low-level, unsafe method to decode a value or throw an exception. This method should not be called in application code, although it can be implemented for user-defined data structures.
- Inherited from
- JsonDecoder
Low-level, unsafe method to decode a value or throw an exception. This method should not be called in application code, although it can be implemented for user-defined data structures.
Low-level, unsafe method to decode a value or throw an exception. This method should not be called in application code, although it can be implemented for user-defined data structures.
- Inherited from
- JsonDecoder
Low-level, unsafe method to decode a value or throw an exception. This method should not be called in application code, although it can be implemented for user-defined data structures.
Low-level, unsafe method to decode a value or throw an exception. This method should not be called in application code, although it can be implemented for user-defined data structures.
- Inherited from
- JsonDecoder
Low-level, unsafe method to decode a value or throw an exception. This method should not be called in application code, although it can be implemented for user-defined data structures.
Low-level, unsafe method to decode a value or throw an exception. This method should not be called in application code, although it can be implemented for user-defined data structures.
- Inherited from
- JsonDecoder
Returns this decoder but widened to the its given super-type
Returns this decoder but widened to the its given super-type
- Inherited from
- JsonDecoder
Returns this decoder but widened to the its given super-type
Returns this decoder but widened to the its given super-type
- Inherited from
- JsonDecoder
Returns this decoder but widened to the its given super-type
Returns this decoder but widened to the its given super-type
- Inherited from
- JsonDecoder
Returns this decoder but widened to the its given super-type
Returns this decoder but widened to the its given super-type
- Inherited from
- JsonDecoder
Returns this decoder but widened to the its given super-type
Returns this decoder but widened to the its given super-type
- Inherited from
- JsonDecoder
Returns this decoder but widened to the its given super-type
Returns this decoder but widened to the its given super-type
- Inherited from
- JsonDecoder
Returns this decoder but widened to the its given super-type
Returns this decoder but widened to the its given super-type
- Inherited from
- JsonDecoder
Returns this decoder but widened to the its given super-type
Returns this decoder but widened to the its given super-type
- Inherited from
- JsonDecoder
Returns this decoder but widened to the its given super-type
Returns this decoder but widened to the its given super-type
- Inherited from
- JsonDecoder
Returns this decoder but widened to the its given super-type
Returns this decoder but widened to the its given super-type
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec into a single codec that decodes a tuple of the values decoded by the respective codecs.
Returns a new codec that combines this codec and the specified codec into a single codec that decodes a tuple of the values decoded by the respective codecs.
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec into a single codec that decodes a tuple of the values decoded by the respective codecs.
Returns a new codec that combines this codec and the specified codec into a single codec that decodes a tuple of the values decoded by the respective codecs.
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec into a single codec that decodes a tuple of the values decoded by the respective codecs.
Returns a new codec that combines this codec and the specified codec into a single codec that decodes a tuple of the values decoded by the respective codecs.
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec into a single codec that decodes a tuple of the values decoded by the respective codecs.
Returns a new codec that combines this codec and the specified codec into a single codec that decodes a tuple of the values decoded by the respective codecs.
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec into a single codec that decodes a tuple of the values decoded by the respective codecs.
Returns a new codec that combines this codec and the specified codec into a single codec that decodes a tuple of the values decoded by the respective codecs.
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec into a single codec that decodes a tuple of the values decoded by the respective codecs.
Returns a new codec that combines this codec and the specified codec into a single codec that decodes a tuple of the values decoded by the respective codecs.
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec into a single codec that decodes a tuple of the values decoded by the respective codecs.
Returns a new codec that combines this codec and the specified codec into a single codec that decodes a tuple of the values decoded by the respective codecs.
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec into a single codec that decodes a tuple of the values decoded by the respective codecs.
Returns a new codec that combines this codec and the specified codec into a single codec that decodes a tuple of the values decoded by the respective codecs.
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec into a single codec that decodes a tuple of the values decoded by the respective codecs.
Returns a new codec that combines this codec and the specified codec into a single codec that decodes a tuple of the values decoded by the respective codecs.
- Inherited from
- JsonDecoder
Returns a new codec that combines this codec and the specified codec into a single codec that decodes a tuple of the values decoded by the respective codecs.
Returns a new codec that combines this codec and the specified codec into a single codec that decodes a tuple of the values decoded by the respective codecs.
- Inherited from
- JsonDecoder
Zips two codecs, but discards the output on the right hand side.
Zips two codecs, but discards the output on the right hand side.
- Inherited from
- JsonDecoder
Zips two codecs, but discards the output on the right hand side.
Zips two codecs, but discards the output on the right hand side.
- Inherited from
- JsonDecoder
Zips two codecs, but discards the output on the right hand side.
Zips two codecs, but discards the output on the right hand side.
- Inherited from
- JsonDecoder
Zips two codecs, but discards the output on the right hand side.
Zips two codecs, but discards the output on the right hand side.
- Inherited from
- JsonDecoder
Zips two codecs, but discards the output on the right hand side.
Zips two codecs, but discards the output on the right hand side.
- Inherited from
- JsonDecoder
Zips two codecs, but discards the output on the right hand side.
Zips two codecs, but discards the output on the right hand side.
- Inherited from
- JsonDecoder
Zips two codecs, but discards the output on the right hand side.
Zips two codecs, but discards the output on the right hand side.
- Inherited from
- JsonDecoder
Zips two codecs, but discards the output on the right hand side.
Zips two codecs, but discards the output on the right hand side.
- Inherited from
- JsonDecoder
Zips two codecs, but discards the output on the right hand side.
Zips two codecs, but discards the output on the right hand side.
- Inherited from
- JsonDecoder
Zips two codecs, but discards the output on the right hand side.
Zips two codecs, but discards the output on the right hand side.
- Inherited from
- JsonDecoder
Zips two codecs, but discards the output on the left hand side.
Zips two codecs, but discards the output on the left hand side.
- Inherited from
- JsonDecoder
Zips two codecs, but discards the output on the left hand side.
Zips two codecs, but discards the output on the left hand side.
- Inherited from
- JsonDecoder
Zips two codecs, but discards the output on the left hand side.
Zips two codecs, but discards the output on the left hand side.
- Inherited from
- JsonDecoder
Zips two codecs, but discards the output on the left hand side.
Zips two codecs, but discards the output on the left hand side.
- Inherited from
- JsonDecoder
Zips two codecs, but discards the output on the left hand side.
Zips two codecs, but discards the output on the left hand side.
- Inherited from
- JsonDecoder
Zips two codecs, but discards the output on the left hand side.
Zips two codecs, but discards the output on the left hand side.
- Inherited from
- JsonDecoder
Zips two codecs, but discards the output on the left hand side.
Zips two codecs, but discards the output on the left hand side.
- Inherited from
- JsonDecoder
Zips two codecs, but discards the output on the left hand side.
Zips two codecs, but discards the output on the left hand side.
- Inherited from
- JsonDecoder
Zips two codecs, but discards the output on the left hand side.
Zips two codecs, but discards the output on the left hand side.
- Inherited from
- JsonDecoder
Zips two codecs, but discards the output on the left hand side.
Zips two codecs, but discards the output on the left hand side.
- Inherited from
- JsonDecoder
Zips two codecs into one, transforming the outputs of both codecs by the specified function.
Zips two codecs into one, transforming the outputs of both codecs by the specified function.
- Inherited from
- JsonDecoder
Zips two codecs into one, transforming the outputs of both codecs by the specified function.
Zips two codecs into one, transforming the outputs of both codecs by the specified function.
- Inherited from
- JsonDecoder
Zips two codecs into one, transforming the outputs of both codecs by the specified function.
Zips two codecs into one, transforming the outputs of both codecs by the specified function.
- Inherited from
- JsonDecoder
Zips two codecs into one, transforming the outputs of both codecs by the specified function.
Zips two codecs into one, transforming the outputs of both codecs by the specified function.
- Inherited from
- JsonDecoder
Zips two codecs into one, transforming the outputs of both codecs by the specified function.
Zips two codecs into one, transforming the outputs of both codecs by the specified function.
- Inherited from
- JsonDecoder
Zips two codecs into one, transforming the outputs of both codecs by the specified function.
Zips two codecs into one, transforming the outputs of both codecs by the specified function.
- Inherited from
- JsonDecoder
Zips two codecs into one, transforming the outputs of both codecs by the specified function.
Zips two codecs into one, transforming the outputs of both codecs by the specified function.
- Inherited from
- JsonDecoder
Zips two codecs into one, transforming the outputs of both codecs by the specified function.
Zips two codecs into one, transforming the outputs of both codecs by the specified function.
- Inherited from
- JsonDecoder
Zips two codecs into one, transforming the outputs of both codecs by the specified function.
Zips two codecs into one, transforming the outputs of both codecs by the specified function.
- Inherited from
- JsonDecoder
Zips two codecs into one, transforming the outputs of both codecs by the specified function.
Zips two codecs into one, transforming the outputs of both codecs by the specified function.
- Inherited from
- JsonDecoder