An Output for GenCodec which serializes data into plain Scala objects.
- "lists" are represented as Scala Lists
- "objects" are represented as String-keyed Scala Maps
- simple values (strings, numbers, booleans, byte arrays) are represented as themselves, unchanged
In other words, serialized value yield by SimpleValueOutput is a Scala object guaranteed to be one of:
- null
- Int
- Long
- Double
- Boolean
- String
- Array[Byte]
- scala.collection.Seq[Any] where every element is also one of the listed types
- scala.collection.Map[String,Any] where every value is also one of the listed types
Such format is often useful as an intermediate representation. For example, it can be later safely passed to
standard Java serialization. However, for performance reasons it's recommended to implement dedicated
Input and Output for the final format (e.g. binary or JSON).
An Output for GenCodec which serializes data into plain Scala objects.
- "lists" are represented as Scala
List
s - "objects" are represented asString
-keyed ScalaMap
s - simple values (strings, numbers, booleans, byte arrays) are represented as themselves, unchangedIn other words, serialized value yield by
SimpleValueOutput
is a Scala object guaranteed to be one of: -null
-Int
-Long
-Double
-Boolean
-String
-Array[Byte]
-scala.collection.Seq[Any]
where every element is also one of the listed types -scala.collection.Map[String,Any]
where every value is also one of the listed typesSuch format is often useful as an intermediate representation. For example, it can be later safely passed to standard Java serialization. However, for performance reasons it's recommended to implement dedicated Input and Output for the final format (e.g. binary or JSON).