Hi Olingo Community,
Regarding the Json metadata document GSoC project currently I have
progressed upto the metadata document serialization at the server side. [1]
Now I have moved implementation of client side metadata document
de-serialization.
When I have look at the current Service Document Json deserializer and
metadata document xml deserialzer in client core lib, the approach which is
used to deserialize either Json and xml payloads of metadata/service
document is writing custom Jackson deserializer classes. For the Json
service document a single custom deserializer (
JSONServiceDocumentDeserializer ) is being used, and for the xml metadata
document case set of deserializer classes for parts of metadata
document (EntityContainerDeserialize,
ReferenceDeserializer) and they are registered on jackson mapper object
using annotations first and then called recursively when we go through the
each element of metadata document when parsing the relevant payload.
I am thinking of adapting the similar approach to Json metadata document
deserialization, basically to write Jackson custom deserializer classes for
json metadata document elements similar to xml case ( but there are some
changes documents). I see some advantages of this basically this approach
is complaint with the current approach, custom deserializer classes are
more robust and adaptable complex custom cases when compared to approaches
just simply use Jackson annotations to map json fields to java object
fields.
Are there any other approaches available to achieve this? And What should
be the best approach to use?
Regards
Kevin
[1]https://github.com/djkevincr/olingo-odata4/tree/jsonMetadata