A C# class for encoding/decoding JSON data into a usable runtime data structure.
JSONObject is on
GitHub Features:
* To parse, create a JSONObject | JSONObject obj = new JSONObject(str);
* To encode, convert to string | Debug.Log(obj);
* Decode JSON-formatted strings into a usable data structure
* Encode structured data into a JSON-formatted string
* Interoperable with Dictionary and WWWForm
* Optimized parse/stringify functions -- minimal (unavoidable) garbage creation
* Asynchronous stringify function for serializing lots of data without frame drops
* MaxDepth parsing will skip over nested data that you don't need
* Special (non-compliant) "Baked" object type can store stringified data within parsed objects
* Copy to new JSONObject
* Merge with another JSONObject (experimental)
* Random access (with [int] or [string])
* ToString() returns JSON data with optional "pretty" flag to include newlines and tabs
* Switch between double and float for numeric storage depending on level of precision needed (and to ensure that numbers are parsed/stringified correctly)
* Supports Infinity and NaN values
* JSONTemplates static class provides serialization functions for common classes like Vector3, Matrix4x4
* Object pool implementation (experimental)
* Handy JSONChecker window to test parsing on sample data
Note: new version has a revised parser that fixes some prior issues with certain input data
Check out the
full documentation on the Unify wiki.