Subject: [netmod] XML->JSON translation

From: Ladislav Lhotka <[email-masked]>
Date: Thu, 23 Aug 2012 16:41:29 +0200

Hi,

I wrote a plugin for pyang ("jsonxsl" output format) that does the XML -> JSON translation according to draft-lhotka-yang-json-01. It takes one or more YANG modules as input and generates an XSLT 1.0 stylesheet that can be used with any XSLT processor (e.g. xsltproc) for performing the translation for any XML instance document conforming to the data model.

Two limitations I am aware of:

- "union" type is always rendered as string in JSON,
- values of "instance-identifier" type are not transformed.

If will fix both later (at least partly).

For those who are interested, please checkout the current pyang revision from SVN, test the plugin and let me know if you discover any problems.

Thanks, Lada

-- 
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C