A super efficient binary serialization format for JSON, focused on minimal encoding size through dictionaries and varints.
PSON is a binary serialization format specifically designed to encode JSON data with minimal size. It combines techniques from JSON, BJSON, Protocol Buffers, and ZIP to reduce network payloads significantly, using dictionaries and variable-length integers for efficiency. The format is particularly useful for applications where bandwidth conservation is critical.
Developers working on network-intensive applications, such as real-time web apps, IoT devices, or APIs, who need to reduce JSON payload sizes without complex compression algorithms.
PSON offers a straightforward, library-based approach to JSON compression that can reduce payload sizes by up to 55% with dictionaries, outperforming plain JSON in scenarios with repetitive data structures. Its compatibility with JavaScript environments makes it easy to integrate into existing projects.
A super efficient binary serialization format for JSON.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
With static dictionaries, PSON reduces JSON payloads by up to 55%, as shown in the package.json example where it cut size from 813 to 613 bytes.
Automatically builds dictionaries per connection to minimize redundancy, ideal for session-based apps with repeated data patterns.
Uses varints and 32-bit floats where possible, borrowing from Protobuf to shrink integer and float sizes without data loss.
Works in Node.js, browsers, and AMD/CommonJS environments, making integration straightforward for full-stack JavaScript apps.
Requires ByteBuffer.js and optionally Long.js, adding bundle size and setup complexity compared to native JSON methods.
Static dictionaries need manual creation and sharing, while progressive dictionaries require per-connection instances, complicating scaling.
Binary format isn't inspectable like JSON, making debugging harder without dedicated decoding tools or extra steps.