public interface DocumentBody
DocumentBody
performs a simple serialization/de-serialization between
Map<String, Object>
and byte[]
.
java.lang.String
.Integer
or Long
if it
is bigger than Integer.MAX_VALUE
or smaller than
Integer.MIN_VALUE
.Double
.If there is any exception with serialization/de-serialization, the entire data will be ignored, and an empty DocumentBody will be created.
Field names starting with _
are reserved for internal use, and
must not be modified by client code.
Changing the data stored within this object will not result in changes to the database unless explicitly saved as a new revision.
Modifier and Type | Method and Description |
---|---|
byte[] |
asBytes()
Returns copy of the data as a byte array.
|
java.util.Map<java.lang.String,java.lang.Object> |
asMap()
Returns a shallow copy of the underlying data as a map.
|
java.util.Map<java.lang.String,java.lang.Object> asMap()
Returns a shallow copy of the underlying data as a map.
Modifying the map below the first level will be visible to other
users of the DocumentBody
object and so should be avoided.
Map
.byte[] asBytes()
Returns copy of the data as a byte array.
Modifying this data will not affect the data for the DocumentBody.