JsonSerializer

algoliasearch.internal.JsonSerializer
See theJsonSerializer companion object
class JsonSerializer(implicit val formats: Formats)

Utility class for JSON serialization and deserialization using JSON4S. It provides functionality to convert Scala objects to their JSON representation and vice versa.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def deserialize[T : Manifest](stream: InputStream): T

Deserializes a JSON InputStream into a Scala object of a given type.

Deserializes a JSON InputStream into a Scala object of a given type.

Type parameters

T

The type of the Scala object.

Value parameters

stream

InputStream containing JSON.

Attributes

Returns

The deserialized Scala object.

def serialize[T](stream: OutputStream, obj: T): Unit

Serializes a Scala object into its JSON representation.

Serializes a Scala object into its JSON representation.

Value parameters

obj

The Scala object to serialize.

stream

output stream.

Attributes

Implicits

Implicits

implicit val formats: Formats