A parser that supports key lookups while also strictly enforcing the ECMA-404 JSON standard. The library is written in C and designed to be compliant with ISO C90 and MISRA C. It has proven safe memory use and no heap allocation, making it suitable for IoT microcontrollers, but also fully portable to other platforms.
Memory RequirementsMemory requirements of the JSON library.
Code Size of coreJSON (example generated with GCC for ARM Cortex-M) File With -O1 Optimization With -Os Optimization core_json.c 2.9K 2.4K Total estimates 2.9K 2.4K DesignJSON Library Design
Memory UsageAll functions in the JSON library operate only on the buffers provided and use only local variables on the stack. In order to support static-only usage, we made a trade-off to re-parse as necessary so that we would not need to keep state.
Parsing StrictnessInput validation is necessary for strong security posture. As such, the parser strictly enforces the ECMA-404 JSON standard. Additionally, JSON documents are checked for illegal UTF-8 sequences, and strings have unicode hex escapes validated.
Compliance & CoverageThe JSON library is designed to be compliant with ISO C90 and MISRA C:2012. All functions are written to have minimal complexity. Unit tests and CBMC proofs are written to cover every path of execution and achieve 100% branch coverage.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4