COMP: Update jsonxx to latest TransitApp/jsonxx#98
COMP: Update jsonxx to latest TransitApp/jsonxx#98thewtex wants to merge 3 commits intoInsightSoftwareConsortium:masterfrom
Conversation
jhlegarreta
left a comment
There was a problem hiding this comment.
Thanks for doing this Matt.
|
I think we need to move to a different JSON library -- the existing one fails to build with MSVC and is not maintained. |
This one is really famous: https://github.com/nlohmann/json, it seems great to use, but slow performance (not sure about our requirements). The fastest is simdjson: https://github.com/simdjson/simdjson/#performance-results |
|
:Ooo:, simdjson looks nice! I am also finding glaze: https://github.com/stephenberry/glaze Claims to be faster than simdjson, but requires C++20. Has a neat reflection API. |
b9f6c33 to
0b5ad20
Compare
Update vendored jsonxx to TransitApp/jsonxx master (eede690, 2025-11-24) which includes an includes cleanup removing cassert from the header. The original hjiang/jsonxx repo (v1.0.1) has not been updated since 2021; TransitApp fork is the actively maintained continuation. Replace GCC case range extension with individual case labels for MSVC. Applied clang-format 19.1.7 to match project style.
Replace `static const Object EmptyObject = {};` (and Array, Value
variants) with `inline` accessor functions returning a local static.
The `static const` form creates per-TU copies whose constructors
reference symbols defined in jsonxx.cc — when the header test TU
links against the shared library on Windows, MSVC cannot resolve
these symbols because they lack __declspec(dllexport).
The `inline` function with a local static is C++17-safe, ODR-correct,
and avoids the linker dependency entirely.
|
Pushed fix for MSVC linker errors ( Root causeTransitApp/jsonxx declares Fix: replaced with |
|
Windows CI still failing — but this is now an upstream action bug, not a jsonxx issue. The Fix PRs: ITKRemoteModuleBuildTestPackageAction#130 (v5.4.6) and #131 (main). Once merged, CI here should be re-triggered. Error traceThe junction |
hjmjohnson
left a comment
There was a problem hiding this comment.
Updating to the new vendored code seems to work accross the platforms.
Update vendored jsonxx from hjiang/jsonxx v1.0.1 (2021) to TransitApp/jsonxx master (eede690, 2025-11-24). TransitApp's fork is the actively maintained continuation with includes cleanup and bug fixes.
Changes
cassertmoved out of header,string_viewsupport added, general code improvements.'0'...'9') with individual case labels for MSVC compatibility.Previous review comments
14from CMake standard comment — already addressed on master via earlier PRs.