How freertos/corejson works
Project type and purpose
• This is a standalone C library (“coreJSON”) for parsing and querying JSON on low-memory embedded devices.
• It strictly enforces ECMA-404, is MISRA-checked, has CBMC proofs for memory safety, unit tests with Unity, fuzzing integration (ClusterFuzzLite), and documentation via Doxygen.
File structure
• Top-level “source/” holds the core implementation (core_json.c) and public headers in source/include.
• “test/unit-test/” contains CMake scripts and Unity tests.
• “test/cbmc/proofs/” contains CBMC harnesses and proofs for formal verification.
• “.clusterfuzzlite/” holds Dockerfile, build scripts, fuzzer configs for automated fuzz testing.
• “docs/doxygen/” holds configuration and styling for HTML API docs.
• “tools/coverity/” and “tools/unity/” hold static-analysis and test-framework configs.
• GitHub workflows in “.github/workflows/” orchestrate CI, fuzzing, docs generation, and releases.
Key insights from the README
• The library’s API (JSON_Validate, JSON_Search, etc.) is the core functionality.
• Build uses C90/C99-compatible compilers, optional replacement headers for stdbool/stdint.
• Documentation generation via Doxygen.
• Unit tests require CMake, Ruby (for Unity), and CBMC proofs require the CBMC toolchain.