incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Stroud <>
Subject RE: JSON transform - Analogous to XML/XSLT
Date Fri, 08 Apr 2011 14:22:21 GMT

Ummm, I guess I would consider Javascript as a means by which to do JSON transformations -
I could also use a myriad of languages & scripting to accomplish it as well.  But I would
not consider it intended to be XSLT in the analogy.  XSLT is explicitly designed (and frameworks
explicitly optimized) to transform XML.  I was looking for something that has been designed
(and implemented and optimized) for the purpose of transforming JSON.  If Javascript is the
best tool to transform JSON (at this time), then that's what I got.

> From:
> To:
> Date: Fri, 8 Apr 2011 15:53:00 +0200
> Subject: RE: JSON transform - Analogous to XML/XSLT
> 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.
> ------------------------------------------------------------------------
> ------------------------------------------------------------------------
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message