Thanks to visit codestin.com
Credit goes to github.com

Skip to content

EOSerialization

Diwischek edited this page Dec 1, 2018 · 1 revision

Home


EOToJSON.java offers JSON Serialization. With it's counterpart, the JSON Deserialization, it offers three different serialization types :

  • STANDARD
  • SCALAR
  • EO

All types allow to compare serialized JSON results on String level with ordered objects and maps.

STANDARD

This is the serialization type know with standard JSON. Only the fields are ordered, so one can compare the string of a source and target json files.

"aMap":{
     "first":false,
     "second":5,
     "third":"value"
}

EO

This serialization type add some type information from the model to the name similar to the type cast in Java. Since also array has a "name" to allow typing, it has no classic array notations, only hash notations:

"(Array)aList":{
     "(Boolean)0":false,
     "(Integer)1":5,
     "2":"value"
}

It allows type safe serialization/deserialization of complex objects.

Since the configurations for Models could be serialized via JSON, the source computer could offer all information necessary to a client to deserialize this type of JSON.

Scalar

This experimental type adds the type information like in the EO type to the name, but only for scalar leaves.

"aList":[
     "(Boolean)0":false,
     "(Integer)1":5,
     "2":"value"
]

fluentcodes - elastic objects - mvn repository



                  

Clone this wiki locally