gabriel/yajl-objc
FreeObjective-C bindings for YAJL (Yet Another JSON Library) C library
About gabriel/yajl-objc
yajl-objc provides Objective-C bindings for YAJL (Yet Another JSON Library), a C library for SAX-style JSON parsing. It offers stream parsing capabilities, support for comments in JSON, improved error messages, and proper handling of large numeric types. Developers can parse JSON from NSString or NSData, generate JSON from Objective-C objects (NSArray, NSDictionary, etc.), and use a document-style parser. The library supports integration via CocoaPods ('YAJLO' pod) and Swift Package Manager. It includes options for allowing comments, checking UTF-8, and enforcing strict numeric precision. The streaming parser (YAJLParser) enables delegate-based parsing for large or incremental data.
Key Features
Pros & Cons
- Stream parsing reduces memory usage for large JSON documents
- User-friendly error messages help debug malformed JSON
- Supports JSON comments, useful for configuration files
- Properly handles large integers without precision loss
- Multiple integration options (CocoaPods, SPM) for convenience
- Well-documented usage examples in README
- Flexible parser options to validate UTF-8 or enforce strict numeric precision
- Limited to Objective-C; requires bridging for Swift, though Xcode supports mixed-language projects
- No built-in support for modern JSON features like KeyPaths or Codable (available in Swift)
- Project maintenance status is unclear; last commit may be several years old
- Not an AI-specific tool; it's a general-purpose JSON library