Mailing List Archive

JSON and BIND formats
-----BEGIN PGP SIGNED MESSAGE-----

I have converted my nascent python test suite to BIND, and then
converted that to JSON, and then pretty printed the JSON.
The BIND and json formats are attached.

- --
Stuart D. Gathman <stuart@bmsi.com>
Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
Charset: noconv

iQEVAwUBRKNXJIJnzZxkHLLFAQGHQAf/S5oSC7aHXesI2iLETPdx3EBlO9TpPD1L
ILeHUSo2BPnu0Udrpw3dfjTyTKri/ewTgK3p2eq2ACi/fz+v+OOtBaP/YWAQY27k
Ks3zVBCLCdubvl0uNcfi2yEVlUSiUSW1GLhQ+B+mEg359gUW3m0HIuUr2J3ByB+l
qBBEpHRvX8t+RfjKI0yLgZj0c5WW5Gj8T3uaNsvbm+qUVo40nbninULn5+bSgSTh
19ePm/oclUJA8+XGlmsgAn/4RvbvqHHbo7UuNIFUBavbzEK2VST1t2HvHWJMPGha
49s8N2Vljem+/9yQF+R34HRSkCEqZafVos4HsBVNWEgjrL1/V6jm4A==
=HGNk
-----END PGP SIGNATURE-----

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com
Re: JSON and BIND formats [ In reply to ]
On Thursday 29 June 2006 00:29, Stuart D. Gathman wrote:
> I have converted my nascent python test suite to BIND, and then
> converted that to JSON, and then pretty printed the JSON.
> The BIND and json formats are attached.

As somewhat who is data format agnostic and not an expert on BIND Zone files,
I find either reasonably readable/parsable. I like the idea of being able to
feed the data into BIND and test the DNS library too, but I think either is a
reasonable choice.

Are there good FLOSS tools for JSON?

Scott K

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com
Re: JSON and BIND formats [ In reply to ]
On Thu, 29 Jun 2006, Scott Kitterman wrote:

> As somewhat who is data format agnostic and not an expert on BIND Zone files,
> I find either reasonably readable/parsable. I like the idea of being able to
> feed the data into BIND and test the DNS library too, but I think either is a
> reasonable choice.

> Are there good FLOSS tools for JSON?

http://json.org

And for YAML:

http://yaml.org

Notably absent on the YAML site is a C implementation. This is probably
because of the OO emphasis in YAML on serializing arbitrary object graphs
in a human readable form.

JSON only dumps and loads passive data as a non-shared map/list graph.
The YAML functions 'safe_dump' and 'safe_load' are close to what
JSON does.

The simplified BIND format depends on a flexible CSV library to parse
conveniently. The Python csv module can do it
(separator=' ', skipinitialspace=True, prepend tab to initial whitespace), but
convenient support in other languages is iffy. Of course, CSV is simple enough
to roll your own in any language.

YAML is pretty printed by design.

I found only one non-windows JSON/Javascript pretty printer, and it was
an online service - and didn't handle quoted braces and brackets either. So
I ended up manually formatting the json data for spf-devel. Of course, I can
roll my own (and have a prototype), but it is one of those just non-trivial
enough to be annoying things. JSON developers never see the data except
when debugging - it just gets passed back and forth between languages in
various forms of RPC.

--
Stuart D. Gathman <stuart@bmsi.com>
Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com