Object

org.locationtech.geomesa.features.kryo.json

KryoJsonSerialization

Related Doc: package json

Permalink

object KryoJsonSerialization extends LazyLogging

Serializes into bson (http://bsonspec.org/). Note this is a limited form of bson that only matches the existing json types - does not cover the bson extensions like binary data, etc. Also note endianness, etc might not match the spec 100%.

Reduced BSON spec - only native JSON elements supported:

byte 1 byte (8-bits) int32 4 bytes (32-bit signed integer, two's complement) int64 8 bytes (64-bit signed integer, two's complement) double 8 bytes (64-bit IEEE 754-2008 binary floating point)

document ::= int32 e_list "\x00" BSON Document. int32 is the total number of bytes comprising the document. e_list ::= element e_list | "" element ::= "\x01" e_name double 64-bit binary floating point | "\x02" e_name string UTF-8 string | "\x03" e_name document Embedded document | "\x04" e_name document Array | "\x08" e_name "\x00" Boolean "false" | "\x08" e_name "\x01" Boolean "true" | "\x09" e_name int64 UTC datetime | "\x0A" e_name Null value | "\x10" e_name int32 32-bit integer | "\x11" e_name int64 Timestamp | "\x12" e_name int64 64-bit integer e_name ::= cstring Key name string ::= int32 (byte*) "\x00" String - The int32 is the number bytes in the (byte*) + 1 (for the trailing '\x00'). The (byte*) is zero or more UTF-8 encoded characters. cstring ::= (byte*) "\x00" Zero or more modified UTF-8 encoded characters followed by '\x00'. The (byte*) MUST NOT contain '\x00', hence it is not full UTF-8.

Note: Array - The document for an array is a normal BSON document with integer values for the keys, starting with 0 and continuing sequentially. For example, the array ['red', 'blue'] would be encoded as the document {'0': 'red', '1': 'blue'}. The keys must be in ascending numerical order.

Linear Supertypes
LazyLogging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. KryoJsonSerialization
  2. LazyLogging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def deserialize(in: Input, path: Seq[PathElement]): Any

    Permalink

    Deserialize the result of a json-path.

    Deserialize the result of a json-path. The input should be pointing to the start of the bytes written by serialize. There is no guarantee where the input will be pointing after completion.

    If the path selects leaf elements, they will be returned as primitives. If the path selects objects, they will be returned as json strings. If more than one item is selected, they will be returned in a Seq. If nothing is selected, it will return null.

    in

    input, pointing to the start of the json object

    path

    json path to evaluate

    returns

    result of the path, if any

  7. def deserialize(in: Input): JObject

    Permalink

    Deserialize the given input.

    Deserialize the given input. The input should be pointing to the start of the bytes written by serialize. Upon completion, the input will be pointing to the first byte after the bytes written by serialize.

    in

    input, pointing to the start of the json object

    returns

    parsed json object

  8. def deserializeAndRender(in: Input): String

    Permalink

    Deserialize the given input.

    Deserialize the given input. The input should be pointing to the start of the bytes written by serialize. Upon completion, the input will be pointing to the first byte after the bytes written by serialize.

    in

    input, pointing to the start of the json object

    returns

    json as a string

  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. lazy val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    LazyLogging
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. def serialize(out: Output, json: JObject): Unit

    Permalink

    Serialize a json object

    Serialize a json object

    out

    output to write to

    json

    object to serialize

  20. def serialize(out: Output, json: String): Unit

    Permalink

    Serialize a json object

    Serialize a json object

    out

    output to write to

    json

    json string to serialize - must be a json object

  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  22. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from LazyLogging

Inherited from AnyRef

Inherited from Any

Ungrouped