What would be the best software to map my objects to dictionaries? There are a 
lot of packages in pharo that deal with JSON somehow. But it seems none does 
mapping from objects to dictionaries and is standalone. We’ve got

- NeoJSON package . Maps objects to strings directly for performance reason
- JSON package. Maps string to JsonObject (subclassed from dictionary)
- Voyage magritte based mapper: Closest to what I find useful but buried inside 
of Voyage. And I’m not sure it would be easy to factor out this module as a 
standalone mapper.
- Seaside javascript… : I forgot what it really does. I often shy away looking 
at it because I don’t want to suck in all the dependencies. 

I’m asking because for me this is an important asset. If we talk about JSON 
there are three things: Objects, JSON structure (being dictionaries and other 
collections in pharo) and JSON strings. Writing to another server or to a file 
producing JSON strings seems to be enough. But using it for another system like 
MongoDB or ElasticSearch this does not work. Here the common interface seems to 
be dictionaries. With ElasticSearch mapping dictionaries to JSON and MongoDB 
mapping dictionaries to BSON. So a good descriptive way to map objects to 
dictionaries would be a good thing to have.

Any thoughts?

Norbert

Reply via email to