23-08-2006 I release parseXML() code
13-07-2007 Stefan releases the client with XML support
09-06-2007 I release gsSQL system
09-08-2007 Stefan mentions that there is support for MySQL in some places
---------- Later, we have SQLite.
25-10-2011 Stefan releases new client (for Mac) with JSON support
03-11-2011 Release of the Windows client with JSON support
03-11-2011 Here I am, releasing the JSON parser that I made last year that I've been hiding away...
json: the basic features are the ability to create a
JSONObject attached to the thing joining the class (
this.JSON) via
this.open(fileid) and save it back to a file via
this.update(). You can parse arbitrary JSON with the parse function but I've never used it directly as it's just a wrapper for JSONObject.initjson(). You can serialized
JSONObjects with stringify(JSONObject), but it is just a wrapper for
JSONObject.stringify().
jsondump: endows a
JSONObject with the ability to be serialized via
JSONObject.stringify().
jsongarbagecollector: done with that object?
JSONObject.kill().
jsonobject: the meat of the parsing is done here. Call
JSONObject.initjson(json) to do so. It is based loosely off of Douglas Crockford's JSON parser, but gets around the loop limit (somewhat).
It is very lax in the syntax. For example, anywhere that : or , is required in true JSON, this script will skip over those characters, assuming that you meant : or ,. Additionally, the terminal }, ], ", or ' at the very end of the JSON will be added for you (but I wouldn't rely on it). Doing
open then
update will fix any 'errors'.