JsonSerializer

smile.json.JsonSerializer
See theJsonSerializer companion object
class JsonSerializer(buffer: ByteBuffer) extends LazyLogging

JSON Serializer in BSON format as defined by http://bsonspec.org/spec.html. This is not fully compatible with BSON spec, where the root must be a document/JsObject. In contrast, the root can be any JsValue in our implementation. Correspondingly, the root will always has the type byte as the first byte.

Not Multi-threading safe. Each thread should have its own BsonSerializer instance. Data size limit to 10MB by default.

Although JsTime/JsDateTime can be represented to nanosecond precision, we don't store the nano-of-second field to save the space. To preserve the high precision of time, JsTimestamp should be employed and of course consumes more space.

Attributes

Companion
object
Graph
Supertypes
trait LazyLogging
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def clear(): Unit

Clears the object buffer.

Clears the object buffer.

Attributes

def deserialize(bytes: Array[Byte]): JsValue
def deserialize(buffer: ByteBuffer): JsValue
def serialize(json: JsValue): Array[Byte]

Inherited fields

lazy protected val logger: Logger

Attributes

Inherited from:
LazyLogging