-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Currently, it is not clear enough how the EntityModule
intends to serialize entities.
FROST-Client/src/main/java/de/fraunhofer/iosb/ilt/sta/jackson/EntitySerializer.java
Line 58 in 2ff4182
gen.writeFieldName("@iot.id"); |
FROST-Client/src/main/java/de/fraunhofer/iosb/ilt/sta/jackson/EntitySerializer.java
Line 80 in 2ff4182
gen.writeFieldName("@iot.id"); |
Due to the above lines, prepopulated fields of subentities are thrown away. I would like to know the reasoning for this design decision to further understand if this is intended behaviour or not. In our use case, we would like to serialize/deserialize a Thing
including its Datastream
s and Location
s. However, the fields of Datastream
s and Location
s that were populated by an Expand
query are thrown away during JSON serialization. Could you maybe elaborate a bit on the above, and point me into the right direction on how I can serialize the subentities without losing their populated fields and not having to perform separate fetch queries?