Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
dd603ee
Use streaming jsoncons SAX parsing and test all JSON engines
Oct 13, 2026
10644d7
Stream and finalize YAJL parsing and harden argument paths
Oct 13, 2026
b4e1eb9
Stream RapidJSON and nlohmann SAX adapters and enforce parser contracts
Oct 13, 2026
e6fe3a3
Validate remaining native adapters and automate API regression checks
Oct 13, 2026
404e953
Merge common Sonar corrections from YAJL stack layer
Oct 13, 2026
f8b20d7
Merge streaming adapter Sonar corrections
Oct 13, 2026
3d1f65f
Use typed RAII and specific exception handling in streaming adapters
Oct 13, 2026
da812b3
Split native parser validation into focused checked helpers
Oct 13, 2026
46e8cda
Fix Sonar findings in CLI, YAJL and shared C++ test resources
Oct 13, 2026
2324562
Merge shared Sonar reliability corrections
Oct 13, 2026
c16d958
Merge reviewed streaming reliability corrections
Oct 13, 2026
cdc69d1
Resolve remaining shared Sonar reliability and complexity findings
Oct 13, 2026
bdeb8e4
Clarify streaming captures and typed scratch storage
Oct 13, 2026
6917ba4
Simplify native input policy and validation helpers
Oct 13, 2026
3028171
Release test diagnostics through their C allocator boundary
Oct 13, 2026
8b003c9
Document iteration validation and standalone C test helper linking
Oct 13, 2026
1a236bb
Link C diagnostic ownership helper in documented API check
Oct 13, 2026
05263b5
Integrate verified shared Sonar and test ownership fixes
Oct 13, 2026
f8629f1
Bound RapidJSON reader scratch memory with an owned vector arena
Oct 13, 2026
43b88ee
Integrate bounded reader arena and shared C diagnostic tests
Oct 13, 2026
4ed9122
Share numeric DOM initialization and integrate C diagnostic test owne…
Oct 13, 2026
c72cb5a
Define stateless scratch allocator comparisons as hidden friends
Oct 13, 2026
0f4b2ea
Integrate private scratch allocator comparison refinement
Oct 13, 2026
702b3aa
Share native C++ argument output and remove duplicate checks
Oct 13, 2026
f0627ad
Limit native parse diagnostic variable to its error check
Oct 13, 2026
ad0c4e2
Merge pull request #11: streaming jsoncons/YAJL and Sonar corrections
Easton97-Jens Oct 13, 2026
0ad46e5
Merge pull request #12: checked streaming RapidJSON and nlohmann SAX
Easton97-Jens Oct 13, 2026
715ae64
Merge pull request #13: native validation, shared output and API cove…
Easton97-Jens Oct 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,15 @@ m4/lt~obsolete.m4
# can automatically generate from config.status script
# (which is called by configure script))
Makefile

# Generated API test executables and Automake reports.
/tests/*_api_tests
/tests/pathhandler_tests
/tests/*.log
/tests/*.trs
/tests/__pycache__/
/build-aux/
/config.h
/config.h.in~
/configure~
/jsonbench-*.tar.gz
3 changes: 3 additions & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Match the C++17 standard in src/Makefile.am and tests/Makefile.am.
# Automatic analysis otherwise recommends newer-standard facilities.
sonar.cfamily.reportingCppStandardOverride=c++17
6 changes: 4 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
SUBDIRS = src
dist_doc_DATA = README
SUBDIRS = src tests
dist_doc_DATA = README
EXTRA_DIST = docs/adapter-stack.md docs/adapter-stack-benchmark.json \
docs/jsoncons-sax.md docs/validation-results.md
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,35 @@ tests/run_tests.sh # all available engines
tests/run_tests.sh SIMDJSON # single engine
```

The runner requires Python 3 (standard library only). Every selected engine
runs the same regression matrix: explicit argument output, valid/invalid JSON,
UTF-8, numeric ranges, size/limit boundaries, silent mode and repeated passes.
Failures and unsupported-limit skips are reported separately; missing expected
output is a failure. A JSONCONS-only run also compares applicable cases to YAJL
when it is installed. Other engines' known defects remain visible as failures.

The jsoncons adapter uses streaming SAX events, strict JSON syntax and lossless
number events. See [the implementation and compatibility notes](docs/jsoncons-sax.md)
and [validation results](docs/validation-results.md).

To exercise the jsoncons C interface separately after configuring the project
(use the same include flags as your normal build):

```bash
gcc -std=gnu11 -c tests/test_c_memory.c -o /tmp/jsonbench-test-c-memory.o
g++ -std=c++17 ${CPPFLAGS:-} tests/jsoncons_api_tests.cpp src/jsonconsparser.cpp \
/tmp/jsonbench-test-c-memory.o -o /tmp/jsoncons_api_tests
/tmp/jsoncons_api_tests
```

For memory-safety validation, add `-fsanitize=address,undefined
-fno-omit-frame-pointer` to both compilation commands. For repeatable DOM/SAX/YAJL
measurements, preserve a pre-change executable and run:

```bash
python3 tests/benchmark_jsoncons.py --baseline /path/to/jsonbench-before --binary src/jsonbench
```

---

## TODO
Expand Down
4 changes: 3 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

AC_PREREQ([2.69])
AC_INIT([jsonbench], [0.2], [airween@gmail.com])
AC_USE_SYSTEM_EXTENSIONS
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
Expand All @@ -15,6 +16,7 @@ PKGPATH=$($PKG_CONFIG --variable pc_path pkg-config)
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_CHECK_FUNCS([newlocale uselocale freelocale duplocale])

JSONC_CFLAGS=""
JSONC_LDADD=""
Expand Down Expand Up @@ -696,7 +698,7 @@ AC_CHECK_LIB([m], [powl], [], AC_MSG_ERROR([libm is not installed.], 1))

# Checks for library functions.

AC_CONFIG_FILES([Makefile src/Makefile])
AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])

AC_MSG_NOTICE([JSON library summary:])
Expand Down
Loading