PengZheng opened a new pull request, #842: URL: https://github.com/apache/celix/pull/842
## Summary This PR adds **JSON Schema (draft-07) validation**, **JSON Pointer**, and **JSON Patch** support to the new `jansson_ext` library, along with the supporting infrastructure needed to make it production-ready. ### New capabilities - **JSON Schema validation** (`celix_jansson_schema.h`): draft-07 keyword support, `$ref` resolution including remote references, recursion depth guard for circular references, abort-on-first-error mode, and a full instance-path reporting mechanism. - **JSON Pointer** (`celix_jansson_pointer.h`): parse/evaluate pointers with buffer-reuse and automatic cleanup support. - **JSON Patch** (`celix_json_patch.h`): apply/validate patch documents, with self-reference and null-value guards. - **URI validation** (`celix_jansson_uri`): `uri` format validation with array-index and malformed-pointer checks, IPv6 zone-id rejection, and automatic cleanup of URI resources. - **String format checkers**: email (Ragel-generated SMTP state machine, corrupted tables fixed), time, IPv4/IPv6 validation. - **String hash maps**: `properties`/`dependencies` handling refactored from hash tables to string hash maps for better memory management. ### Robustness & hardening - Multiple hardening passes fixing unhandled allocation failures (OOM) throughout schema validation, JSON pointer operations, URI handling, and patch operations — with `error-injection` (EI) tests covering the OOM paths (`stdio_ei` vsnprintf support added). - Fixes for leaks (double-free, path string management) found during coverage analysis. ### Tests & tooling - ~9,000 lines of new unit tests, including the upstream JSON-Schema-Test-Suite draft-07 corpus. - C++ compatibility for `celix_util.h` with unit tests for string buffer functions. - Conan `test_package` support for `jansson_ext`. - Coverage build fix: test execution enabled and `lcov` `--ignore-errors` flag removed. - `rat-excludes.txt` updated for the vendored JSON-Schema-Test-Suite corpus. ### Files 127 files changed, ~27.4k insertions. The bulk is `libs/jansson_ext/` (new library sources, headers, examples, and tests). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
