Json library - some fragments

David Bovill david at openpartnership.net
Tue Jun 19 14:51:17 EDT 2007


I've put a few handlers together to parse JSON data - http://www.json.org/

It is not exactly a library, but my aim is to put together some useful
and fast handlers to dig out the data people most need from JSON
feeds. My approach at the moment is to construct tables that can
easily be converted to arrays, and to allow a couple of layers of
nesting by using different separators - so a JSON feed that looks like
this:

[{"hash":"xxx","tags":{"tools":275,"social":1580,"web":694},"total_posts":14023}]

Results in a tab separated table that looks like this:

hash [tab] xxx
tags [tab] tools:275,social:1580,web:694
total_posts [tab] 14023

This is then easy to extract what you need by using split / combine
and arrays? But if anyone else has any handlers for the collection -
post em in - so I can rework them and publish them for a good ol' open
source shredding :)



More information about the use-livecode mailing list