-
Notifications
You must be signed in to change notification settings - Fork 1
EODeserialization
Diwischek edited this page Dec 2, 2018
·
2 revisions
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:
- data_
- (type)key: typed data
- calls_: method calls
- log_: log messages
The deserialization with EO is not as fast as other frameworks, since each object is wrapped by an EO object.
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"));