Skip to content

EODeserialization

Diwischek edited this page Dec 2, 2018 · 2 revisions

Home


JSONToEO.java offers JSON deserialization. With it's counterpart, the JSON Serialization, it supports three different serialization types :

  • STANDARD
  • SCALAR
  • EO

It interpretes the following keys when mapping the JSON string to EO:

The deserialization with EO is not as fast as other frameworks, since each object is wrapped by an EO object.

EO Type Example

Here a simple example for a "typesafe json".

        final String jsnString = "{\"(BasicTest)_data\":{\"testFloat\":1.1}}";
        eo
                .add()
                .map(jsnString);

        assertEquals(BasicTest.class, eo.getModelClass());
        assertEquals(1.1F, eo.get("testFloat"));

Test


fluentcodes - elastic objects - mvn repository



                  

Clone this wiki locally