[Pharo-users] Embedding object properties in NeoJSON mappings
emaringolo at gmail.com
Fri Feb 22 09:06:26 EST 2019
El vie., 22 feb. 2019 a las 7:55, Sven Van Caekenberghe
(<sven at stfx.eu>) escribió:
> > On 22 Feb 2019, at 02:05, Esteban Maringolo <emaringolo at gmail.com> wrote:
> > Am I stretching it too much? :)
> Yes, this is out of the scope of NeoJSON.
> As you know, JSON is strictly limited and kept simple, by design.
> Things people do to shoehorn objects, classes, types, ids, collections, references, etc on to it are exactly that, hacks on top.
> There are many ways to try to do any of this.
I though so. :)
> What you are doing now, a two pass approach, is what I would do too: first use NeoJSON
> to get a standard structure (maybe use NeoJSONObject for simplicity),
> next do some extra work - and vice versa.
> Note that Pharo itself might lack some meta info to describe a mapping by itself
> (collections have no element types for example), so a good mapping is always
> necessary to go to a statically typed model.
> There is a reason STON exists, it is one answer to this problem.
Thanks, I'll look into it to see if I can adapt it to my needs.
More information about the Pharo-users