Repository navigation
ok_json v1.0.0: The Safety-Critical Release
After extensive development and rigorous validation, ok_json has officially reached version 1.0.0.
This milestone marks the transition from a functional MVP to a production-ready, defense-grade C99 JSON parser. Designed specifically for memory-constrained and safety-critical systems, this release guarantees predictable execution, strict standard compliance, and absolute memory safety without relying on external dependencies (although it can be used in any software project, no just highly safe & critical ones!).
Key Highlights
- Verified RFC 8259 Compliance: The parser has dropped its "provisional" status. It has been mathematically verified against Nicolas Seriot's industry-standard
JSONTestSuite, successfully handling the most hostile and structurally complex JSON edge cases known to the community. - Strict MISRA C:2012 Alignment: The codebase passes rigorous static analysis with zero outstanding MISRA C:2012 violations. All core logic has been refactored to ensure single-return paths, exhaustive conditionals, and optimized ROM footprints.
- Cryptographic Memory Safety: Integrated
libFuzzerwith AddressSanitizer (ASan) and UndefinedBehaviorSanitizer (UBSan) into the continuous integration pipeline. The parser has been proven to gracefully reject millions of malformed, randomized byte sequences without a single memory leak, buffer over-read, or undefined behavior event. - Zero Dynamic Allocation: 100% stack-based execution. No
malloc, nofree, and zero standard library dependencies.
Testing & Quality Assurance
- Coverage: 100% branch and statement coverage maintained across 190+ unit tests.
- Continuous Integration: Parallelized automated workflows now enforce compilation, memory checking (Valgrind), MISRA static analysis (cppcheck), and continuous fuzzing on every commit.
What's Changed
- Add MVP roadmap document for ok_json parser by @ionux in #1
- Fix all 7 MVP bugs, implement getters, remove stdlib dependencies by @ionux in #2
- Add Phase 4 tests, fix max-tokens detection, Phase 5 docs/polish by @ionux in #3
- Update MVP_ROADMAP and TODO_LIST to reflect current completed state by @ionux in #4
- Fix #3 and #4: populate array/object count and enforce string length … by @ionux in #5
- Fix #7: handle backslash escape sequences in string scanning by @ionux in #6
- Add MISRA-oriented warning flags to CFLAGS by @ionux in #7
- Enforce max array and object size limits in getters by @ionux in #8
- Add array/object raw getters, element counters, and debug print by @ionux in #9
- Add OKJ_MAX_JSON_LEN constant and enforce it in okj_parse() by @ionux in #10
- docs: add comprehensive local wiki and link from README by @ionux in #11
- Add RFC 8259 escape sequence validation and tests by @ionux in #12
- Implement complete RFC 8259 number format parsing and tests by @ionux in #13
- Add 9 boundary tests covering empty containers, nested types, null, k… by @ionux in #14
- Fix return codes and add missing error-path tests by @ionux in #15
- Ensure all processed strings are null-terminated for safety by @ionux in #16
- Add fixed-size depth/state stack with bracket matching and depth ceiling by @ionux in #17
- Update TODO_LIST and MVP_ROADMAP to reflect current project state by @ionux in #18
- Reject bare control characters in strings per RFC 8259 §7 by @ionux in #19
- Validate single top-level value and reject trailing non-whitespace by @ionux in #20
- Enforce full RFC 8259 grammar compliance in parser by @ionux in #21
- Enforce UTF-8 validity for RFC 8259 string parsing by @ionux in #22
- Add unit test for realistic IoT sensor JSON payload by @ionux in #23
- Add unit test for two-element user data JSON array by @ionux in #24
- Add unit test for deeply nested valid JSON by @ionux in #25
- Add unit test exercising upper limits of the JSON parser by @ionux in #26
- Update README to match current API and header definitions by @ionux in #27
- Add test_object_exactly_32_members test by @ionux in #28
- test: add MC/DC UTF-8 tests for okj_validate_utf8_sequence by @ionux in #29
- Add unit test for null byte injected into a string token by @ionux in #30
- Add unit tests for okj_copy_string with a 1-byte destination buffer by @ionux in #31
- test: enforce first-match-wins contract for duplicate JSON keys by @ionux in #32
- Add test_empty_string_key to verify RFC 8259 empty-string key handling by @ionux in #33
- Add boundary test for OKJ_MAX_JSON_LEN (4096 vs 4097 bytes) by @ionux in #34
- test: add test_null_pointer_safety for exhaustive NULL API boundary c… by @ionux in #35
- Add test for RFC 8259 Unicode surrogate-pair escape sequences by @ionux in #36
- test: add test_number_large_near_json_limit by @ionux in #37
- test: add test_depth_stack_alternating_unwind by @ionux in #38
- Add RFC 8259 whitespace stress test for okj_skip_whitespace() by @ionux in #39
- test: add RFC 8259 bare control character rejection tests by @ionux in #40
- test: add quoted-string spoofing test for okj_skip_string() robustness by @ionux in #41
- test: prove Modified UTF-8 overlong NUL (0xC0 0x80) is rejected as OK… by @ionux in #42
- fix: guard against escape sequence straddling the OKJ_MAX_STRING_LEN … by @ionux in #43
- Sync with main. by @ionux in #44
- Refactor for MISRA compliance. by @ionux in #45
- Add unit test for okj_match() null src and lit parameters by @ionux in #46
- docs(wiki): align documentation with current source code by @ionux in #47
- Add unit test for okj_validate_utf8_sequence() null parameter guards by @ionux in #48
- Add unit tests for okj_get_number() null parser and key parameters by @ionux in #49
- Add null parameter unit tests for all getter functions by @ionux in #50
- Add nonexistent-key unit tests for all okj_find_value_index() getters by @ionux in #51
- Include src/ok_json.c directly in test file for full static-function … by @ionux in #52
- Add unit tests covering 16 previously uncovered branches in ok_json.c by @ionux in #53
- Update MVP_ROADMAP and TODO_LIST to reflect current project state by @ionux in #54
- Refactor getter functions to caller-provided output pattern by @ionux in #55
- docs: update API docs to reflect output-parameter getter signatures by @ionux in #56
- Require explicit length params for all string/key inputs by @ionux in #57
- docs: update all docs to reflect current function signatures by @ionux in #58
- docs: update MVP_ROADMAP and TODO_LIST to reflect current project state by @ionux in #59
- docs: update MVP_ROADMAP and TODO_LIST to reflect passing fuzzer by @ionux in #60
- docs: record JSONTestSuite 283/283 compliance verification by @ionux in #61
- wiki: correct and complete documentation by @ionux in #62
Full Changelog: https://github.com/ionux/ok_json/commits/v1.0.0