JSON generic converters
For those who AJAXing and work closely with JS this intercahnge format is essential. For those who things it’s tricky – check out first the origianl site devoted to JSON - json.org and then – wikipedia page (http://en.wikipedia.org/wiki/JSON) to realize how it’s easy. Built-in JS’s methods stringify and parse are basic for processing JSON back/forth strings
The advanced scenarios are smart Stringifiers and converters forth/back XML. The last one is especially applied task for making data compatible between 2 technologies (one may not know about JSON) and to improve performance of data transition (JSON is ~30% less and faster in remote data excahnging then XML)
Just to share with you guys ready-to-go Java Script libraries:
- Stringifier (with smart logic) find here implementation (http://www.thomasfrank.se/downloadableJS/jsonStringify.js) and notes from author
- XML<->JSON conversion in JS: first implementation and second implementation
Those who relies on frameworks and platforms – JSON’s classes with all needed features are included in Java, .Net and some databases (JSOn serializers on a fly)
P.S. jsut for fun – the same problem the same solution – Win Registry serializer on VC++ http://www.codeguru.com/cpp/w-p/system/registry/article.php/c2859