Am 05.12.2013 um 17:03 schrieb Chris Cunningham <cunningham...@gmail.com>:
> I've used the SCouchDB interface - which include mapping object to > dictionaries (well, JSONObjects) and mapping back from them. > http://www.squeaksource.com/SCouchDB.html > Of course, it is tied to CouchDB, but shouldn't be to hard to pry the mapping > part out (once you find it). > Thanks. I’ll take a look at the code. norbert > > On Thu, Dec 5, 2013 at 7:44 AM, Norbert Hartl <norb...@hartl.name> wrote: > 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 >