Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   A history of disappointment: part III (https://forums.graalonline.com/forums/showthread.php?t=134264968)

Tolnaftate2004 11-03-2011 11:13 PM

A history of disappointment: part III
 
4 Attachment(s)
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...

:cry:

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'.

haro41 11-04-2011 12:40 AM

can i use it to shot baddies.


All times are GMT +2. The time now is 01:58 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.