Stef,
On 24 Sep 2017, at 12:26, Stephane Ducasse <stepharo.self@gmail.com> wrote:
Hi Sven
For Moose we are wondering if we can use STON to save/load models instead of MSE. - I'm sure we can :)
Now my little friends would like to kill two or three birds with the same stone :)
Would it be possible to use STON to handle cycles but to generate JSON compatible in the following sense:
Class { "id": 123, "name" : "A" }
=>
{ "id": 123, "type" : "Class", "name" : "A" }
It means that we could be able to output an extra field and when we read that the materialiser would create an entity based on the type field for example.
Am I thinking something totally wrong?
I am not sure how to answer. It should be possible to use STON as it is, no ? JSON is different, as you know. NeoJSON was not designed to work with such dynamic types, its optional mapping mechanism works with a static type map. STON is a format with an implementation, it is not designed as a general purpose object visitor. Sven
Stef