Hello graphistas
We get json data back from a web app and we'd like to store the relevant parts of it in a @NodeEntity. We are currently following the approach to flatten the deep JSON structure to a flat Map<String, Object>, where the keys are converted to a dotted notation.
is converted to a Map likeCode:{ "foo" : { "bar": 1, "baz": 2 } }
in an entity likeCode:"foo.bar" => 1 "foo.baz" => 2
PHP Code:@NodeEntity
public class MyEntity {
private Map<String, Object> propertiesToStore;
...
}
We now would like to store the key-value pairs of this propertiesToStore field directly as node properties. Any ideas how this could be implemented with Spring Data Graph?
Or are there even simpler or alternative approaches to store a JSON structure in a node with Spring Data Graph without using a Map as a field?
Best regards,
James


Reply With Quote