JSONUtils

This page is more or less inspired by the one of JSONParse.

What is it?
It's a JSON parser written in UnityScript ("UnityJS"). I found JSONParse which was really good but I was expecting some other features. JSONUtils is a JSON parser which allow some other things like serialize to JSON for some data types like Hashtable, Array, numbers, booleans and strings.

What is different from JSONParse ?
The first and more important thing : this script parse JSON "object" into Hashtable, not Object. Some functions let you serialize your data into JSON if it contains only following data types : Array, Object, Hashtable, number (int, float, double), boolean or String.

Parse JSON

 * Put the script in the Plugins folder.
 * Call JSONUtils.ParseJSON( JSONText ) to get an Hashtable according your JSON.

Serialized to JSON
Call JSONUtils.ObjectToJSON(object) or JSONUtils.HashtableToJSON(hashtable) to get a string from your object/hashtable.

Who do I contact for help / questions?
Feel free to email me if you upgrade/clean/adapt this code.

[mailto:i.magniez@casusbelli.fr Indiana MAGNIEZ]

The testing script
You can use this script adding it on an object in your scene after addition of JSONUtils.js to your project (ideally in Plugins).