couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clement Hallet <>
Subject Re: JSON transform - Analogous to XML/XSLT
Date Fri, 08 Apr 2011 14:17:22 GMT
Nevertheless, it's a good way to explain what CouchDb is to beginners :
 - JSON is like XML
 - Javascript views are like XSLT


Le 8 avr. 2011 à 15:53, Nils Breunese a écrit :

> I guess "that" is called JavaScript.
> Nils.
> ________________________________________
> Van: Scott Stroud []
> Verzonden: vrijdag 8 april 2011 15:38
> Aan:
> 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.
> ------------------------------------------------------------------------
> ------------------------------------------------------------------------

View raw message