Add JSON Schema -> C++ streaming parser generator
CI / pre-commit (push) Successful in 52s
CI / build (-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++, clang-arm64, ubuntu-latest-arm64, true) (push) Successful in 53s
CI / build (-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++, gcc-arm64, ubuntu-latest-arm64, false) (push) Successful in 51s
CI / build (-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++, clang-amd64, ubuntu-latest-amd64, true) (push) Successful in 1m33s
CI / build (-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++, gcc-amd64, ubuntu-latest-amd64, false) (push) Successful in 1m24s

Generates a C++ type and a streaming builder parser from a JSON Schema,
built on weaseljson. The builder copies incoming bytes directly into their
final destinations in the result struct (no intermediate DOM) and hands
back ownership via take() once parsing completes.

Supports objects/structs, required vs optional (std::optional) fields,
nullable types, string enums, arrays, $ref including recursion (broken
with unique_ptr), and additionalProperties (strict reject or skip).
Unsupported schema constructs are rejected at generation time; schema
violations are rejected at parse time.
This commit is contained in:
2026-06-14 23:46:15 -04:00
parent ca6f69424f
commit dfcac64330
4 changed files with 1357 additions and 0 deletions
File diff suppressed because it is too large Load Diff