From user-return-15722-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Fri Apr 08 13:38:33 2011 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 85699 invoked from network); 8 Apr 2011 13:38:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Apr 2011 13:38:33 -0000 Received: (qmail 82738 invoked by uid 500); 8 Apr 2011 13:38:31 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 82691 invoked by uid 500); 8 Apr 2011 13:38:31 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 82683 invoked by uid 99); 8 Apr 2011 13:38:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 13:38:31 +0000 X-ASF-Spam-Status: No, hits=4.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mj1932@hotmail.com designates 65.55.90.168 as permitted sender) Received: from [65.55.90.168] (HELO snt0-omc3-s29.snt0.hotmail.com) (65.55.90.168) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Apr 2011 13:38:21 +0000 Received: from SNT128-W7 ([65.55.90.137]) by snt0-omc3-s29.snt0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 8 Apr 2011 06:38:00 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_fbba69fa-6de7-4df5-b742-dea18747797a_" X-Originating-IP: [199.46.199.233] From: Scott Stroud To: Subject: JSON transform - Analogous to XML/XSLT Date: Fri, 8 Apr 2011 13:38:00 +0000 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 08 Apr 2011 13:38:00.0873 (UTC) FILETIME=[2DC16190:01CBF5F2] X-Virus-Checked: Checked by ClamAV on apache.org --_fbba69fa-6de7-4df5-b742-dea18747797a_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable My apologies if this has brought up previously=2C I couldn't find it in the= archives ... Is there any tools/frameworks/specs to transform JSON? In a similar=20 approach as XSLT is to XML. Basically I have an inbound JSON doc that I=20 do NOT want to save in CouchDB in that format. =20 I'm a CouchDB newb but from what I've gathered so far is that Couch=20 design docs (views) provide javascript functionality to create a new doc but thats after its already been added. I would really like to just=20 "transform" the doc prior to it being saved in CouchDB. I'm sure there=20 are approaches that use views to submit a new "transformed" doc based=20 off the original=2C but I would really prefer something that does it "pre=20 commit". Also there are other aspects in our system that are not=20 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=20 XSLT and then transform it back to JSON=2C but that seems like overkill to me. =20 I also saw JSONT that attempts to do what Im requesting but either the=20 documentation is minimal or for some other reason=2C it doesn't appear to=20 have delivered. So I would prefer some approach that is not coupled=20 with CouchDB=2C but if "that" does not exist any advice on a CouchDB=20 approach would be appreciated. But a week into using CouchDB I've been impressed with how simple & clean using it is. Thanks. = --_fbba69fa-6de7-4df5-b742-dea18747797a_--