KSON is minification for your JSON. At the price of readability and complexity, you can use KSON reduce the size of your serialized data.
Compared to other serialization libraries, the overhead is minimal. Minified kson.min.js is only 2KB small (less than 1K gzipped). As for speed, since KSON builds on JSON, most of parsing is done using native browser functions.
The most obvious redundancy in an array of objects encoded with JSON are the keys on each object. These which only has to be loaded once. Your data can be compressed even further by leveraging domain knowledge and using KSON's flexible codec system.
KSON.stringify
Derive Schema
Schema
JSON
Run Benchmark
KSON Size/Item bytes/item
JSON Size/Item bytes/item
Comming soon
- Schema Derivation
- Alternative Schema Syntax
- Validation Logic for development
- Examples for Nested Schemas
- Examples for Pipelined Coders
- Compiler for Custom Client Libraries
- Python Implementation
- Go Implementation
- KSON Documents with Inline Schemas