[Released] ULTIMATE JSON

Introduce first version of Quick JSON - Unity plugin for working with JSON.

1)DESCRIPTION:

Best JSON Serializer/Deserializer on UNITY. Two times faster as the Newtonsoft(NETJson).
Based on FastJson.

Android, iOS, Windows Phone, Windows, Mac OS, Linux

2)FEATURES:

  • faster JSON Serializer/Deserializer on UNITY;
  • based on FastJSON;
  • JSON Framework for comfort working with JSON;
  • 2 method for compress/decompress JSON: LZMA and QZIP
  • Support UTF8 fields of JSON
  • Full source code
  • Multiplatform plugin: Android, iOS, Windows Phone, Windows, Mac OS, Linux

3)METHODS:

JSONObject:

  • (void) Deserialise(string JSONString):
    deserialize JSON

-(T) TryGetValue():
try get value from JSONObject with Generic type.

  • (string) ToString():
    return string of this JObject

  • (string) ToJSON(object obj):
    return JSON string from object - serialize object

JSONCompress:

  • (byte) CompressJSON(string JSON, bool best = true):
    Compress JSON string to a)if best = true - LZMA
    b)if best = false - QZIP
  • (string) DecompressJSON(byte sourceData, bool best = true):
    Decompress byte data to string JSON from a) if best = true - LZMA
    b) if best = false - QZIP
  1. EXAMPLES(HOW USAGE):

COMPRESS/DECOMPRESS:

string JSON = "{ \ "name\ ": \ "Вася\ ", \ "age\ ": 35, \ "isAdmin\ ": false, \ "friends\ “: [0,1,2,3] }”;
byte compressed = JSONCompress.CompressJSON (JSON, true);
string decompressedString =JSONCompress.DecompressJSON(compressed, true);
//in compressed - compressed Data of JSON
//in decompressedString - decompressed source JSON

JSON Serializer/Deserializer:
JSONObject jObject = new JSONObject ();
//line - source JSON string
jObject.Deserialise (line);
JSONObject testObject = jObject[“boolean”][0];
string text = testObject.finishObj.ToString();
string name = jObject [“personages”] [“1”].TryGetValue ();
//show all keys in Dictonary
void showDic(JSONObject jObject) {
Dictionary<string, JSONObject> dic = jObject.dic;
foreach(string key in dic.Keys) {
Debug.Log (key);
if (dic [key].dic != null) {
showDic (dic [key]);
} else if (dic [key].list != null) {
showList (dic [key]);
} else {
Debug.Log (“value:” + dic[key].finishObj);
}
}
}
//show all keys in list
void showList(JSONObject jObject) {
List list = jObject.list;
foreach(JSONObject listNode in list) {
Debug.Log (listNode.finishObj);
}
}

5)CONTACTS:

All of your comments and suggestions please send on email:
tahionstudios@gmail.com
All right reserved by Tahion Studios

Update to 1.0.4
QUICK JSON Now is Ultimate JSON

ULTIMATE JSON by Tahion Studios

1)DESCRIPTION:

Best JSON Serializer/Deserializer on UNITY. Two times faster as the Newtonsoft(NETJson).
Based on FastJson.

Android, iOS, Windows Phone, Windows, Mac OS, Linux

2)FEATURES:

  • faster JSON Serializer/Deserializer on UNITY;
  • based on FastJSON;
  • JSON Framework for comfort working with JSON;
  • 2 method for compress/decompress JSON: LZMA and QZIP
  • Support UTF8 fields of JSON
  • Full source code
  • Multiplatform plugin: Android, iOS, Windows Phone, Windows, Mac OS, Linux

3)TUTORIAL:

a) Go to Edit->UltimateJSON->Copy Dll To Project
b) Go to BuildSettings->PlayerSettings->OtherSettings->Api Compatibility Level = “Net 2.0” (without subset)
c) If you use Mac or part a doesn’t work(if we use 2 or more unity version on one computer (ex. 5.5.0f3 and 5.4.0) or you use Unity x86 version not x64):
c1)Copy System.Data.dll to your Asset Root Folder:
c2)If you use Windows go to UNITY_FOLDER/Editor/Data/Mono/lib/mono/2.0/System.Data.dll ex.: UNITY_FOLDER: “C://ProgramFiles/Unity”
c3)For MacOS: Application/Unity.Unity.app ->Righ Button Mouse Click->Show Package Contents-> Contents/Frameworks/Mono/lib/mono/2.0/System.Data.dll
d) Tutorial Scene - YOUR_UNITY_PROJECT_FOLDER/UltimateJSON/ExampleScene/1.unity

3)METHODS:

JSONObject:

//serialise System.object to JsonString
//addAssemblyTypes - add filed with assembly type in JSON

  • static string Serialise(object obj, bool addAssemblyTypes = false);

//deserialise jsonString to System.object T
//addAssemblyTypes - add filed with assembly type in JSON

  • static T Deserialise(string jsonString, bool addAssemblyTypes = false)

//deserialise jsonString to JsonObject

  • static JsonObject Deserialise(string jsonString);

//get: JsonObject[“personages”][“1”][“preview”].ToString ()
//set: JsonObject[“personages”][“1”][“preview”] = new JsonObject(“ff”);

  • JsonObject [string i] {get; set;};

//for get or set list

  • JsonObject [int i] {get; set;};

//Get object value from JSON, ex.:JsonObject[“preview”].TryGetValue(); -return (int)1;

  • T TryGetValue();

//IEnumerator for foreach, ex.: foreach (var field in JsonObject[“personages”]){ }
-IEnumerator GetEnumerator();

JSONCompress:

//Compress Json if(best = true) Json compress with LZMA Algorithm else compress with gzip

  • static byte[ ] CompressJson(string json, bool best = true)

//DeCompress Json if(best = true) Json decompress with LZMA Algorithm else decompress with gzip

  • static string DecompressJson(byte[ ] sourceData, bool best = true)

4)CONTACTS:

http://tachyon.byethost12.com/

All of your comments and suggestions please send on email:
tahionstudios@gmail.com
All right reserved by Tahion Studios

ULTIMATE JSON Update to 1.2.0

For test performance you can download Android Benchmark APK(2.2Mb JSON File with 5256 records):
Android_APK_Benchmark

Contact WebSIte:
WebSite

DESCRIPTION:
Best JSON Serializer/Deserializer on UNITY. Two times faster as the Newtonsoft(NETJson). Based on FastJson.
Android, iOS, Windows, Mac OS, Linux
FEATURES:

  • faster JSON Serializer/Deserializer for UNITY;
  • simple for use - only import package(not need insert many libraries and files);
  • based on FastJSON;
  • JSON Indexer API Framework;
  • JSON Class Serializer API Framework;
  • Compress Tool for JSON: LZMA and QZIP (for networking);
  • Supported UTF8 fields for JSON fields;
  • Full source code included;
  • Supported and tested on different platforms: Android, iOS, Windows Phone, Windows, Mac OS, Linux;

SupportedTypes:
I) Simple Types:

  • Int
  • Long
  • String
  • Bool
  • DateTime
  • Enum
  • Guid

II) Collection Types:

  • List
  • Dictionary
  • StringDictionary
  • NameValueCollection
  • Array
  • ByteArray
  • Hashtable

III) Unity build-in types:

  • Vector2
  • Vector2Int
  • Vector3
  • Vector3Int
  • Vector4
  • Color
  • Color32
  • Rect
  • RectInt
  • Bounds
  • BoundsInt
  • Quaternion
  • Ray
  • Ray2D