JsonSerializable

io.github.cakelier.tuples.space.JsonSerializable$
See theJsonSerializable companion trait

Companion object to the JsonSerializable type-class, containing its interface and its implementations.

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

The implementation of the JsonSerializable type-class for the JsonElement type.

The implementation of the JsonSerializable type-class for the JsonElement type.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Givens

Givens

The implementation of the io.circe.Decoder type-class for the JsonElement type.

The implementation of the io.circe.Decoder type-class for the JsonElement type.

Attributes

The implementation of the io.circe.Decoder type-class for the JsonTemplate type.

The implementation of the io.circe.Decoder type-class for the JsonTemplate type.

Attributes

The implementation of the io.circe.Decoder type-class for the JsonTuple type.

The implementation of the io.circe.Decoder type-class for the JsonTuple type.

Attributes

The implementation of the io.circe.Encoder type-class for the JsonElement type.

The implementation of the io.circe.Encoder type-class for the JsonElement type.

Attributes

The implementation of the io.circe.Encoder type-class for the JsonTemplate type.

The implementation of the io.circe.Encoder type-class for the JsonTemplate type.

Attributes

The implementation of the io.circe.Encoder type-class for the JsonTuple type.

The implementation of the io.circe.Encoder type-class for the JsonTuple type.

Attributes

The implementation of the JsonSerializable type-class for the JsonElement type.

The implementation of the JsonSerializable type-class for the JsonElement type.

Attributes

given jsonTemplateJsonSerializable[T <: JsonTemplate]: jsonTemplateJsonSerializable[T]

The implementation of the JsonSerializable type-class for the JsonTemplate type.

The implementation of the JsonSerializable type-class for the JsonTemplate type.

Attributes

given jsonTupleJsonSerializable[T <: JsonTuple]: jsonTupleJsonSerializable[T]

The implementation of the JsonSerializable type-class for the JsonTuple type.

The implementation of the JsonSerializable type-class for the JsonTuple type.

Attributes

Extensions

Extensions

extension [A](i: A)(i: A)(using JsonSerializable[A])

Serializes this instance into a string using the JSON format specification.

Serializes this instance into a string using the JSON format specification.

Attributes

Returns

the serialized version of this instance, in JSON format

extension (s: String)(s: String)

Deserializes this string into a scala.util.Success containing a JsonElement, if the string is in a valid JSON format and the semantic of the JSON element are followed. A scala.util.Failure containing a Throwable explaining the reason of the failure in deserializing is returned otherwise.

Deserializes this string into a scala.util.Success containing a JsonElement, if the string is in a valid JSON format and the semantic of the JSON element are followed. A scala.util.Failure containing a Throwable explaining the reason of the failure in deserializing is returned otherwise.

Attributes

Returns

a JsonElement if the deserialization completes with success, a Throwable otherwise

Deserializes this string into a scala.util.Success containing a JsonTemplate, if the string is in a valid JSON format and the semantic of the JSON template are followed. A scala.util.Failure containing a Throwable explaining the reason of the failure in deserializing is returned otherwise.

Deserializes this string into a scala.util.Success containing a JsonTemplate, if the string is in a valid JSON format and the semantic of the JSON template are followed. A scala.util.Failure containing a Throwable explaining the reason of the failure in deserializing is returned otherwise.

Attributes

Returns

a JsonTemplate if the deserialization completes with success, a Throwable otherwise

Deserializes this string into a scala.util.Success containing a JsonTuple, if the string is in a valid JSON format and the semantic of the JSON tuple are followed. A scala.util.Failure containing a Throwable explaining the reason of the failure in deserializing is returned otherwise.

Deserializes this string into a scala.util.Success containing a JsonTuple, if the string is in a valid JSON format and the semantic of the JSON tuple are followed. A scala.util.Failure containing a Throwable explaining the reason of the failure in deserializing is returned otherwise.

Attributes

Returns

a JsonTuple if the deserialization completes with success, a Throwable otherwise