JsonSerializable

io.github.cakelier.tuples.space.JsonSerializable
See theJsonSerializable companion object
trait JsonSerializable[-A]

A type-class representing the operations that need to be supported by an object which can be serialized into a JSON-formatted string.

An object which can be serialized into a string using the JSON formatting needs to specify how to do so using a specific operation, which takes the object as input and returns a JSON-formatted string as output. Whether or not this function returns valid JSON, or JSON at all, is left to the right implementation of the function for the corresponding type of the object.

Type parameters

A

the type of the object that can be serialized in a JSON-formatted way

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def serialize(e: A): String

Serializes an object into a string using the JSON format specification.

Serializes an object into a string using the JSON format specification.

Value parameters

e

the object to serialize

Attributes

Returns

the serialized version of the object, in JSON format