A high-performance Objective-C JSON library for parsing and serializing JSON data.
JSONKit is a high-performance Objective-C library for parsing JSON data into Foundation objects (NSDictionary, NSArray, etc.) and serializing those objects back to JSON. It solves the need for fast JSON processing in iOS and macOS applications, especially where performance exceeds that of Apple's built-in NSJSONSerialization.
Objective-C developers building performance-critical iOS or macOS applications that require efficient JSON parsing and serialization, such as data-intensive networking clients or real-time data processors.
Developers choose JSONKit for its superior speed—benchmarked as 25-40% faster than NSJSONSerialization—and its fine-grained control over parsing options, Unicode handling, and memory usage, making it ideal for optimizing JSON-heavy workflows.
Objective-C 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.
Benchmarks from the README show JSONKit is 25-40% faster than Apple's NSJSONSerialization, thanks to low-level UTF-8 parsing and optimizations like caching for similar JSON structures.
Offers strict RFC 4627 compliance by default, with options for lenient Unicode handling (replacing ill-formed sequences with U+FFFD), C-style comments, and non-standard newlines, giving developers precision over JSON validation.
Automatically detects and decompresses gzipped JSON buffers during parsing, and can compress serialized JSON, reducing network payloads without extra libraries—linking to libz.dylib is handled at runtime.
Parses directly from UTF-8 byte streams, minimizing conversion overhead compared to NSString-based methods, which the README notes can waste memory and time.
The README explicitly states undefined behavior when compiled with Automatic Reference Counting or Mac OS X Garbage Collection, making it incompatible with modern Objective-C projects and limiting future maintenance.
JSONDecoder instances are not thread-safe for shared use; developers must add mutex barriers manually if decoding across threads, adding complexity for concurrent applications.
Due to NSString's internal Unicode handling, JSONKit cannot guarantee bit-for-bit identical strings after serialization-deserialization cycles, which the README warns may have security implications for some use cases.
Last updated in 2011 with benchmarks against older iOS versions, it may lack optimizations for newer hardware or OS features, and its experimental branch (e.g., for gzip) indicates incomplete integration.