Lib JSON Stream

$64
Publisher Chicken Box
File size 18.92kB
Number of files 5
Latest version 1
Latest release date 2018-10-08 10:15:10
First release date 2018-10-08 10:15:10
Supported Unity versions 2018.4.2 or higher

Lib JSON Stream is a IO stream allow your to write or read json data through any stream object.


Usages:
- optimize network messaging performance
- data size 50% smaller before compression
- data size 22% smaller after compression
- serialization 51% faster
- deserialization 47% faster


Key Features:
- encode json object to binary stream
- read json object from binary stream
- reduce encoded data size by reducing redundant property names.
- can generate smaller data compare with other JSON library
- decode binary data efficiently
- javascript and Java port available

Simple API:

// To Serialize objects
var output = new MemoryStream();
var outStream = new org.chickenbox.json.OutputStream(output);
outStream.Write(sceneData); //sceneData is your scene data structure

// To Deserialize objects
var input = new MemoryStream( serializedBytes );
var inStream = new org.chickenbox.json.InputStream(output);
var sceneData = inStream.Read<SceneData>();


Demonstrate serialize and deserialize 100 scenes with 100 objects
- data size 50% smaller before compression
- data size 22% smaller after compression
- serialization 51% faster
- deserialization 47% faster

Avg converted obj byte len by lib json stream: 13407
Avg converted obj byte len by lib json stream after compression: 6697
Total time taken by lib json stream: 0.3989317s

Avg converted obj byte len by JSON.Net: 27228
Avg converted obj byte len by JSON.Net after compression: 8586
Total time taken by JSON.Net: 0.8190006s

Total time taken by lib json stream to read json object: 0.3046894s
Total time taken by JSON.Net to read json object: 0.5754606s

Supporting libraries:
- Lib Json Stream TS
https://github.com/chickenbox/lib_json_stream_ts

- Lib Json Stream Java
https://github.com/chickenbox/lib_json_stream_java