I guess "that" is called JavaScript. Nils. ________________________________________ Van: Scott Stroud [[email protected]] Verzonden: vrijdag 8 april 2011 15:38 Aan: [email protected] Onderwerp: JSON transform - Analogous to XML/XSLT
My apologies if this has brought up previously, I couldn't find it in the archives ... Is there any tools/frameworks/specs to transform JSON? In a similar approach as XSLT is to XML. Basically I have an inbound JSON doc that I do NOT want to save in CouchDB in that format. I'm a CouchDB newb but from what I've gathered so far is that Couch design docs (views) provide javascript functionality to create a new doc but thats after its already been added. I would really like to just "transform" the doc prior to it being saved in CouchDB. I'm sure there are approaches that use views to submit a new "transformed" doc based off the original, but I would really prefer something that does it "pre commit". Also there are other aspects in our system that are not related to CouchDB but I anticipate could leverage "XSLT for JSON". I'm sure that you could use one of the JSON to XML parsers and then use XSLT and then transform it back to JSON, but that seems like overkill to me. I also saw JSONT that attempts to do what Im requesting but either the documentation is minimal or for some other reason, it doesn't appear to have delivered. So I would prefer some approach that is not coupled with CouchDB, but if "that" does not exist any advice on a CouchDB approach would be appreciated. But a week into using CouchDB I've been impressed with how simple & clean using it is. Thanks. ------------------------------------------------------------------------ VPRO www.vpro.nl ------------------------------------------------------------------------
