From 19a794d79a5d6074e7d573e88e705b4543775edf Mon Sep 17 00:00:00 2001 From: Jie Luo Date: Tue, 7 Apr 2026 19:54:04 -0700 Subject: [PATCH 01/27] prevent macro redefined for JSON_HAS_INT64 (#1673) --- include/json/config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/json/config.h b/include/json/config.h index 7f6e2431b..6971fa656 100644 --- a/include/json/config.h +++ b/include/json/config.h @@ -122,7 +122,9 @@ using UInt64 = uint64_t; #endif // if defined(_MSC_VER) using LargestInt = Int64; using LargestUInt = UInt64; +#ifndef JSON_HAS_INT64 #define JSON_HAS_INT64 +#endif // ifndef JSON_HAS_INT64 #endif // if defined(JSON_NO_INT64) template From 87576c45e62c2365a1238d15057bd3e8a22173f7 Mon Sep 17 00:00:00 2001 From: Jordan Bayles Date: Tue, 7 Apr 2026 20:29:23 -0700 Subject: [PATCH 02/27] Fix CMake 4.0 compatibility in jsoncppConfig.cmake.in (#1671) CMake 4.0 has removed compatibility with policy versions below 3.5. This change updates the minimum policy version from 3.0 to 3.5 in `jsoncppConfig.cmake.in` to prevent a fatal configuration error when downstream projects use `find_package(jsoncpp)` with CMake 4.0+. --- jsoncppConfig.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsoncppConfig.cmake.in b/jsoncppConfig.cmake.in index fdd9fea6b..35fed3687 100644 --- a/jsoncppConfig.cmake.in +++ b/jsoncppConfig.cmake.in @@ -1,5 +1,5 @@ cmake_policy(PUSH) -cmake_policy(VERSION 3.0...3.26) +cmake_policy(VERSION 3.5...3.26) @PACKAGE_INIT@ From 2c2754f3c935bfb86af21b8b1636b16a98e793f6 Mon Sep 17 00:00:00 2001 From: Jordan Bayles Date: Tue, 7 Apr 2026 20:46:24 -0700 Subject: [PATCH 03/27] ci: suppress Node 20 deprecation and missing python-version warnings (#1674) - Injects `FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true` in all workflows to opt-in to Node.js 24 and suppress the deprecation warnings from multiple GitHub Actions. - Specifies `python-version: '3.x'` for `actions/setup-python@v5` in `meson.yml` to fix the missing input warning. --- .github/workflows/clang-format.yml | 3 +++ .github/workflows/cmake.yml | 4 ++++ .github/workflows/meson.yml | 7 +++++++ .github/workflows/update-project-version.yml | 3 +++ 4 files changed, 17 insertions(+) diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 221f8b839..eca3c31f5 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -1,6 +1,9 @@ name: clang-format check on: [check_run, pull_request, push] +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + jobs: formatting-check: name: formatting check diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 91f387a50..55452ac25 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -1,5 +1,9 @@ name: cmake on: [check_run, push, pull_request] + +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + jobs: cmake-publish: runs-on: ${{ matrix.os }} diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index 22fe32f72..92d04862f 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -2,6 +2,9 @@ name: meson build and test run-name: update pushed to ${{ github.ref }} on: [check_run, push, pull_request] +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + jobs: meson-publish: runs-on: ${{ matrix.os }} @@ -17,6 +20,8 @@ jobs: - name: setup python uses: actions/setup-python@v5 + with: + python-version: '3.x' - name: meson build uses: BSFishy/meson-build@v1.0.3 @@ -41,6 +46,8 @@ jobs: - name: setup python uses: actions/setup-python@v5 + with: + python-version: '3.x' - name: meson build uses: BSFishy/meson-build@v1.0.3 diff --git a/.github/workflows/update-project-version.yml b/.github/workflows/update-project-version.yml index c00363837..c47e53790 100644 --- a/.github/workflows/update-project-version.yml +++ b/.github/workflows/update-project-version.yml @@ -11,6 +11,9 @@ on: description: 'next soversion (e.g., 28). leave blank to keep current.' required: false +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + jobs: bump-and-verify: runs-on: ubuntu-latest From c67034e4b4c722579ee15fddb8e4af8f04252b08 Mon Sep 17 00:00:00 2001 From: Jordan Bayles Date: Thu, 9 Apr 2026 10:37:08 -0700 Subject: [PATCH 04/27] Fix C++11 ABI breakage when compiled with C++17 #1668 (#1675) * ci: suppress Node 20 deprecation and missing python-version warnings - Injects `FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true` in all workflows to opt-in to Node.js 24 and suppress the deprecation warnings from multiple GitHub Actions. - Specifies `python-version: '3.x'` for `actions/setup-python@v5` in `meson.yml` to fix the missing input warning. * Fix C++11 ABI breakage when compiled with C++17 (#1668) When JSONCPP_HAS_STRING_VIEW was defined, the library dropped the `const char*` and `const String&` overloads for `operator[]`, `get`, `removeMember`, and `isMember`, breaking ABI compatibility for projects consuming the library with C++11. This change unconditionally declares and defines the legacy overloads so they are always exported, restoring compatibility. * ci: add ABI compatibility matrix workflow This adds a new GitHub Actions workflow to verify ABI compatibility across C++ standard boundaries. It explicitly tests the scenario where JsonCpp is built with one standard (e.g., C++11) and consumed by an application built with a newer one (e.g., C++23), and vice versa. To facilitate testing the specific `std::string_view` boundary that is conditionally compiled, a new `stringView` demo application has been added to the `example/` directory and is consumed directly by the CI matrix to ensure standard library symbols link correctly across standard versions, build types (shared/static), and operating systems. * fix: inline std::string_view methods to prevent ABI breaks This commit completely eliminates the ABI breakage that occurs across C++ standard boundaries when using `std::string_view`. Previously, when the library was built with C++17+, CMake would leak `JSONCPP_HAS_STRING_VIEW=1` as a PUBLIC definition. A C++11 consumer would receive this definition, attempt to parse the header, and fail with compiler errors because `std::string_view` is not available in their environment. Conversely, if the library was built in C++11 (without `string_view` symbols), a C++17 consumer would naturally define `JSONCPP_HAS_STRING_VIEW` based on `__cplusplus` inside `value.h`. The consumer would then call the declared `string_view` methods, resulting in linker errors because the methods weren't compiled into the library. By moving all `std::string_view` overloads directly into `value.h` as `inline` methods that delegate to the fundamental `const char*, const char*` methods: 1. The consumer's compiler dictates whether the overloads are visible (via `__cplusplus >= 201703L`). 2. The consumer compiles the inline wrappers locally, removing any reliance on the library's exported symbols for `std::string_view`. 3. CMake no longer needs to pollute the consumer's environment with PUBLIC compile definitions. * run clang format * finish clang format --- .github/workflows/abi-compatibility.yml | 79 +++++++++++++++++++++++++ example/BUILD.bazel | 6 ++ example/CMakeLists.txt | 1 + example/stringView/stringView.cpp | 29 +++++++++ include/json/value.h | 54 +++++++++++------ src/lib_json/CMakeLists.txt | 9 --- src/lib_json/json_value.cpp | 66 --------------------- 7 files changed, 151 insertions(+), 93 deletions(-) create mode 100644 .github/workflows/abi-compatibility.yml create mode 100644 example/stringView/stringView.cpp diff --git a/.github/workflows/abi-compatibility.yml b/.github/workflows/abi-compatibility.yml new file mode 100644 index 000000000..881c4e8e0 --- /dev/null +++ b/.github/workflows/abi-compatibility.yml @@ -0,0 +1,79 @@ +name: ABI Compatibility + +on: [check_run, push, pull_request] + +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + +jobs: + abi-compatibility: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + shared_libs: [ON, OFF] + include: + - jsoncpp_std: 11 + app_std: 23 + - jsoncpp_std: 23 + app_std: 11 + + steps: + - name: checkout project + uses: actions/checkout@v4 + + - name: build and install JsonCpp (C++${{ matrix.jsoncpp_std }}) + shell: bash + run: | + mkdir build-jsoncpp + cd build-jsoncpp + cmake .. -DCMAKE_CXX_STANDARD=${{ matrix.jsoncpp_std }} \ + -DCMAKE_CXX_STANDARD_REQUIRED=ON \ + -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/install-jsoncpp \ + -DBUILD_SHARED_LIBS=${{ matrix.shared_libs }} \ + -DJSONCPP_WITH_TESTS=OFF + cmake --build . --config Release + cmake --install . --config Release + + - name: create example app + shell: bash + run: | + mkdir example-app + cat << 'EOF' > example-app/CMakeLists.txt + cmake_minimum_required(VERSION 3.10) + project(abi_test) + + find_package(jsoncpp REQUIRED CONFIG) + + add_executable(abi_test stringView.cpp) + target_link_libraries(abi_test PRIVATE JsonCpp::JsonCpp) + EOF + + cp $GITHUB_WORKSPACE/example/stringView/stringView.cpp example-app/stringView.cpp + + - name: build example app (C++${{ matrix.app_std }}) + shell: bash + run: | + cd example-app + mkdir build + cd build + cmake .. -DCMAKE_CXX_STANDARD=${{ matrix.app_std }} \ + -DCMAKE_CXX_STANDARD_REQUIRED=ON \ + -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/install-jsoncpp + cmake --build . --config Release + + - name: run example app + shell: bash + run: | + if [ "$RUNNER_OS" == "Windows" ]; then + export PATH=$GITHUB_WORKSPACE/install-jsoncpp/bin:$PATH + ./example-app/build/Release/abi_test.exe + elif [ "$RUNNER_OS" == "macOS" ]; then + export DYLD_LIBRARY_PATH=$GITHUB_WORKSPACE/install-jsoncpp/lib:$DYLD_LIBRARY_PATH + ./example-app/build/abi_test + else + export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/install-jsoncpp/lib:$LD_LIBRARY_PATH + ./example-app/build/abi_test + fi diff --git a/example/BUILD.bazel b/example/BUILD.bazel index ebbd0b58e..35813085b 100644 --- a/example/BUILD.bazel +++ b/example/BUILD.bazel @@ -33,3 +33,9 @@ cc_binary( srcs = ["stringWrite/stringWrite.cpp"], deps = ["//:jsoncpp"], ) + +cc_binary( + name = "stringView", + srcs = ["stringView/stringView.cpp"], + deps = ["//:jsoncpp"], +) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 230d1bd7b..0666db763 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -4,6 +4,7 @@ set(EXAMPLES readFromStream stringWrite streamWrite + stringView ) add_definitions(-D_GLIBCXX_USE_CXX11_ABI) diff --git a/example/stringView/stringView.cpp b/example/stringView/stringView.cpp new file mode 100644 index 000000000..b5e33e9fd --- /dev/null +++ b/example/stringView/stringView.cpp @@ -0,0 +1,29 @@ +#include "json/json.h" +#include +#include + +#if defined(JSONCPP_HAS_STRING_VIEW) +#include +#endif + +/** + * \brief Example using std::string_view with JsonCpp. + */ +int main() { + Json::Value root; + root["key"] = "value"; + +#if defined(JSONCPP_HAS_STRING_VIEW) + std::cout << "Has string_view support" << std::endl; + std::string_view sv("key"); + if (root.isMember(sv)) { + std::cout << root[sv].asString() << std::endl; + } +#else + std::cout << "No string_view support" << std::endl; + if (root.isMember("key")) { + std::cout << root["key"].asString() << std::endl; + } +#endif + return EXIT_SUCCESS; +} diff --git a/include/json/value.h b/include/json/value.h index f32f45609..2007e6b42 100644 --- a/include/json/value.h +++ b/include/json/value.h @@ -357,7 +357,8 @@ class JSON_API Value { Value(const StaticString& value); Value(const String& value); #ifdef JSONCPP_HAS_STRING_VIEW - Value(std::string_view value); + inline Value(std::string_view value) + : Value(value.data(), value.data() + value.length()) {} #endif Value(bool value); Value(std::nullptr_t ptr) = delete; @@ -405,7 +406,14 @@ class JSON_API Value { /** Get string_view of string-value. * \return false if !string. (Seg-fault if str is NULL.) */ - bool getString(std::string_view* str) const; + inline bool getString(std::string_view* str) const { + char const* begin; + char const* end; + if (!getString(&begin, &end)) + return false; + *str = std::string_view(begin, static_cast(end - begin)); + return true; + } #endif Int asInt() const; UInt asUInt() const; @@ -496,12 +504,19 @@ class JSON_API Value { #ifdef JSONCPP_HAS_STRING_VIEW /// Access an object value by name, create a null member if it does not exist. /// \param key may contain embedded nulls. - Value& operator[](std::string_view key); + inline Value& operator[](std::string_view key) { + return resolveReference(key.data(), key.data() + key.length()); + } /// Access an object value by name, returns null if there is no member with /// that name. /// \param key may contain embedded nulls. - const Value& operator[](std::string_view key) const; -#else + inline const Value& operator[](std::string_view key) const { + Value const* found = find(key.data(), key.data() + key.length()); + if (!found) + return nullSingleton(); + return *found; + } +#endif /// Access an object value by name, create a null member if it does not exist. /// \note Because of our implementation, keys are limited to 2^30 -1 chars. /// Exceeding that will cause an exception. @@ -516,7 +531,6 @@ class JSON_API Value { /// that name. /// \param key may contain embedded nulls. const Value& operator[](const String& key) const; -#endif /** \brief Access an object value by name, create a null member if it does not * exist. * @@ -533,8 +547,10 @@ class JSON_API Value { #ifdef JSONCPP_HAS_STRING_VIEW /// Return the member named key if it exist, defaultValue otherwise. /// \note deep copy - Value get(std::string_view key, const Value& defaultValue) const; -#else + inline Value get(std::string_view key, const Value& defaultValue) const { + return get(key.data(), key.data() + key.length(), defaultValue); + } +#endif /// Return the member named key if it exist, defaultValue otherwise. /// \note deep copy Value get(const char* key, const Value& defaultValue) const; @@ -542,7 +558,6 @@ class JSON_API Value { /// \note deep copy /// \param key may contain embedded nulls. Value get(const String& key, const Value& defaultValue) const; -#endif /// Return the member named key if it exist, defaultValue otherwise. /// \note deep copy /// \note key may contain embedded nulls. @@ -588,13 +603,14 @@ class JSON_API Value { /// \pre type() is objectValue or nullValue /// \post type() is unchanged #if JSONCPP_HAS_STRING_VIEW - void removeMember(std::string_view key); -#else + inline void removeMember(std::string_view key) { + removeMember(key.data(), key.data() + key.length(), nullptr); + } +#endif void removeMember(const char* key); /// Same as removeMember(const char*) /// \param key may contain embedded nulls. void removeMember(const String& key); -#endif /** \brief Remove the named map member. * * Update 'removed' iff removed. @@ -602,13 +618,14 @@ class JSON_API Value { * \return true iff removed (no exceptions) */ #if JSONCPP_HAS_STRING_VIEW - bool removeMember(std::string_view key, Value* removed); -#else + inline bool removeMember(std::string_view key, Value* removed) { + return removeMember(key.data(), key.data() + key.length(), removed); + } +#endif bool removeMember(String const& key, Value* removed); /// Same as removeMember(const char* begin, const char* end, Value* removed), /// but 'key' is null-terminated. bool removeMember(const char* key, Value* removed); -#endif /// Same as removeMember(String const& key, Value* removed) bool removeMember(const char* begin, const char* end, Value* removed); /** \brief Remove the indexed array element. @@ -622,15 +639,16 @@ class JSON_API Value { #ifdef JSONCPP_HAS_STRING_VIEW /// Return true if the object has a member named key. /// \param key may contain embedded nulls. - bool isMember(std::string_view key) const; -#else + inline bool isMember(std::string_view key) const { + return isMember(key.data(), key.data() + key.length()); + } +#endif /// Return true if the object has a member named key. /// \note 'key' must be null-terminated. bool isMember(const char* key) const; /// Return true if the object has a member named key. /// \param key may contain embedded nulls. bool isMember(const String& key) const; -#endif /// Same as isMember(String const& key)const bool isMember(const char* begin, const char* end) const; diff --git a/src/lib_json/CMakeLists.txt b/src/lib_json/CMakeLists.txt index 03e933552..a0695e9eb 100644 --- a/src/lib_json/CMakeLists.txt +++ b/src/lib_json/CMakeLists.txt @@ -131,9 +131,6 @@ if(BUILD_SHARED_LIBS) target_compile_features(${SHARED_LIB} PUBLIC ${REQUIRED_FEATURES}) - if(JSONCPP_HAS_STRING_VIEW) - target_compile_definitions(${SHARED_LIB} PUBLIC JSONCPP_HAS_STRING_VIEW=1) - endif() target_include_directories(${SHARED_LIB} PUBLIC $ @@ -168,9 +165,6 @@ if(BUILD_STATIC_LIBS) target_compile_features(${STATIC_LIB} PUBLIC ${REQUIRED_FEATURES}) - if(JSONCPP_HAS_STRING_VIEW) - target_compile_definitions(${STATIC_LIB} PUBLIC JSONCPP_HAS_STRING_VIEW=1) - endif() target_include_directories(${STATIC_LIB} PUBLIC $ @@ -198,9 +192,6 @@ if(BUILD_OBJECT_LIBS) target_compile_features(${OBJECT_LIB} PUBLIC ${REQUIRED_FEATURES}) - if(JSONCPP_HAS_STRING_VIEW) - target_compile_definitions(${OBJECT_LIB} PUBLIC JSONCPP_HAS_STRING_VIEW=1) - endif() target_include_directories(${OBJECT_LIB} PUBLIC $ diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp index 74f77896f..a8eb72d6b 100644 --- a/src/lib_json/json_value.cpp +++ b/src/lib_json/json_value.cpp @@ -441,14 +441,6 @@ Value::Value(const String& value) { value.data(), static_cast(value.length())); } -#ifdef JSONCPP_HAS_STRING_VIEW -Value::Value(std::string_view value) { - initBasic(stringValue, true); - value_.string_ = duplicateAndPrefixStringValue( - value.data(), static_cast(value.length())); -} -#endif - Value::Value(const StaticString& value) { initBasic(stringValue); value_.string_ = const_cast(value.c_str()); @@ -656,21 +648,6 @@ bool Value::getString(char const** begin, char const** end) const { return true; } -#ifdef JSONCPP_HAS_STRING_VIEW -bool Value::getString(std::string_view* str) const { - if (type() != stringValue) - return false; - if (value_.string_ == nullptr) - return false; - const char* begin; - unsigned length; - decodePrefixedString(this->isAllocated(), this->value_.string_, &length, - &begin); - *str = std::string_view(begin, length); - return true; -} -#endif - String Value::asString() const { switch (type()) { case nullValue: @@ -1190,17 +1167,6 @@ Value* Value::demand(char const* begin, char const* end) { "objectValue or nullValue"); return &resolveReference(begin, end); } -#ifdef JSONCPP_HAS_STRING_VIEW -const Value& Value::operator[](std::string_view key) const { - Value const* found = find(key.data(), key.data() + key.length()); - if (!found) - return nullSingleton(); - return *found; -} -Value& Value::operator[](std::string_view key) { - return resolveReference(key.data(), key.data() + key.length()); -} -#else const Value& Value::operator[](const char* key) const { Value const* found = find(key, key + strlen(key)); if (!found) @@ -1221,7 +1187,6 @@ Value& Value::operator[](const char* key) { Value& Value::operator[](const String& key) { return resolveReference(key.data(), key.data() + key.length()); } -#endif Value& Value::operator[](const StaticString& key) { return resolveReference(key.c_str()); @@ -1261,18 +1226,12 @@ Value Value::get(char const* begin, char const* end, Value const* found = find(begin, end); return !found ? defaultValue : *found; } -#ifdef JSONCPP_HAS_STRING_VIEW -Value Value::get(std::string_view key, const Value& defaultValue) const { - return get(key.data(), key.data() + key.length(), defaultValue); -} -#else Value Value::get(char const* key, Value const& defaultValue) const { return get(key, key + strlen(key), defaultValue); } Value Value::get(String const& key, Value const& defaultValue) const { return get(key.data(), key.data() + key.length(), defaultValue); } -#endif bool Value::removeMember(const char* begin, const char* end, Value* removed) { if (type() != objectValue) { @@ -1288,31 +1247,13 @@ bool Value::removeMember(const char* begin, const char* end, Value* removed) { value_.map_->erase(it); return true; } -#ifdef JSONCPP_HAS_STRING_VIEW -bool Value::removeMember(std::string_view key, Value* removed) { - return removeMember(key.data(), key.data() + key.length(), removed); -} -#else bool Value::removeMember(const char* key, Value* removed) { return removeMember(key, key + strlen(key), removed); } bool Value::removeMember(String const& key, Value* removed) { return removeMember(key.data(), key.data() + key.length(), removed); } -#endif - -#ifdef JSONCPP_HAS_STRING_VIEW -void Value::removeMember(std::string_view key) { - JSON_ASSERT_MESSAGE(type() == nullValue || type() == objectValue, - "in Json::Value::removeMember(): requires objectValue"); - if (type() == nullValue) - return; - CZString actualKey(key.data(), unsigned(key.length()), - CZString::noDuplication); - value_.map_->erase(actualKey); -} -#else void Value::removeMember(const char* key) { JSON_ASSERT_MESSAGE(type() == nullValue || type() == objectValue, "in Json::Value::removeMember(): requires objectValue"); @@ -1323,7 +1264,6 @@ void Value::removeMember(const char* key) { value_.map_->erase(actualKey); } void Value::removeMember(const String& key) { removeMember(key.c_str()); } -#endif bool Value::removeIndex(ArrayIndex index, Value* removed) { if (type() != arrayValue) { @@ -1353,18 +1293,12 @@ bool Value::isMember(char const* begin, char const* end) const { Value const* value = find(begin, end); return nullptr != value; } -#ifdef JSONCPP_HAS_STRING_VIEW -bool Value::isMember(std::string_view key) const { - return isMember(key.data(), key.data() + key.length()); -} -#else bool Value::isMember(char const* key) const { return isMember(key, key + strlen(key)); } bool Value::isMember(String const& key) const { return isMember(key.data(), key.data() + key.length()); } -#endif Value::Members Value::getMemberNames() const { JSON_ASSERT_MESSAGE( From 36f94b68d60774d2a5870a6881a92de02ed76eb1 Mon Sep 17 00:00:00 2001 From: Jordan Bayles Date: Thu, 9 Apr 2026 11:01:46 -0700 Subject: [PATCH 05/27] chore: remove leftover CMake checks for std::string_view (#1676) * ci: suppress Node 20 deprecation and missing python-version warnings - Injects `FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true` in all workflows to opt-in to Node.js 24 and suppress the deprecation warnings from multiple GitHub Actions. - Specifies `python-version: '3.x'` for `actions/setup-python@v5` in `meson.yml` to fix the missing input warning. * Fix C++11 ABI breakage when compiled with C++17 (#1668) When JSONCPP_HAS_STRING_VIEW was defined, the library dropped the `const char*` and `const String&` overloads for `operator[]`, `get`, `removeMember`, and `isMember`, breaking ABI compatibility for projects consuming the library with C++11. This change unconditionally declares and defines the legacy overloads so they are always exported, restoring compatibility. * ci: add ABI compatibility matrix workflow This adds a new GitHub Actions workflow to verify ABI compatibility across C++ standard boundaries. It explicitly tests the scenario where JsonCpp is built with one standard (e.g., C++11) and consumed by an application built with a newer one (e.g., C++23), and vice versa. To facilitate testing the specific `std::string_view` boundary that is conditionally compiled, a new `stringView` demo application has been added to the `example/` directory and is consumed directly by the CI matrix to ensure standard library symbols link correctly across standard versions, build types (shared/static), and operating systems. * fix: inline std::string_view methods to prevent ABI breaks This commit completely eliminates the ABI breakage that occurs across C++ standard boundaries when using `std::string_view`. Previously, when the library was built with C++17+, CMake would leak `JSONCPP_HAS_STRING_VIEW=1` as a PUBLIC definition. A C++11 consumer would receive this definition, attempt to parse the header, and fail with compiler errors because `std::string_view` is not available in their environment. Conversely, if the library was built in C++11 (without `string_view` symbols), a C++17 consumer would naturally define `JSONCPP_HAS_STRING_VIEW` based on `__cplusplus` inside `value.h`. The consumer would then call the declared `string_view` methods, resulting in linker errors because the methods weren't compiled into the library. By moving all `std::string_view` overloads directly into `value.h` as `inline` methods that delegate to the fundamental `const char*, const char*` methods: 1. The consumer's compiler dictates whether the overloads are visible (via `__cplusplus >= 201703L`). 2. The consumer compiles the inline wrappers locally, removing any reliance on the library's exported symbols for `std::string_view`. 3. CMake no longer needs to pollute the consumer's environment with PUBLIC compile definitions. * run clang format * finish clang format * chore: remove leftover CMake checks for std::string_view Fixes #1669 This removes the final vestige of the JSONCPP_HAS_STRING_VIEW build system logic. As of the previous commit (inlining std::string_view methods into value.h to fix ABI breaks), the library no longer relies on the build system (CMake or Meson) to check for and define JSONCPP_HAS_STRING_VIEW. The header value.h automatically activates std::string_view overloads purely by checking the consumer`s __cplusplus >= 201703L. Since none of the actual std::string_view symbols are compiled into the .so / .a library anymore, Meson (and CMake) builds are identical regardless of whether string_view is supported by the compiler building the library. * format spacing better --- src/lib_json/CMakeLists.txt | 6 ------ src/lib_json/json_value.cpp | 4 ---- 2 files changed, 10 deletions(-) diff --git a/src/lib_json/CMakeLists.txt b/src/lib_json/CMakeLists.txt index a0695e9eb..7197ba793 100644 --- a/src/lib_json/CMakeLists.txt +++ b/src/lib_json/CMakeLists.txt @@ -7,7 +7,6 @@ include(CheckIncludeFileCXX) include(CheckTypeSize) include(CheckStructHasMember) include(CheckCXXSymbolExists) -include(CheckCXXSourceCompiles) check_include_file_cxx(clocale HAVE_CLOCALE) check_cxx_symbol_exists(localeconv clocale HAVE_LOCALECONV) @@ -26,11 +25,6 @@ if(NOT (HAVE_CLOCALE AND HAVE_LCONV_SIZE AND HAVE_DECIMAL_POINT AND HAVE_LOCALEC endif() endif() -check_cxx_source_compiles( - "#include - int main() { std::string_view sv; return 0; }" - JSONCPP_HAS_STRING_VIEW) - set(JSONCPP_INCLUDE_DIR ../../include) set(PUBLIC_HEADERS diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp index a8eb72d6b..a812ea4d3 100644 --- a/src/lib_json/json_value.cpp +++ b/src/lib_json/json_value.cpp @@ -17,10 +17,6 @@ #include #include -#ifdef JSONCPP_HAS_STRING_VIEW -#include -#endif - // Provide implementation equivalent of std::snprintf for older _MSC compilers #if defined(_MSC_VER) && _MSC_VER < 1900 #include From 217973062e42de90f29f7788d8a657b02c57a80d Mon Sep 17 00:00:00 2001 From: Jordan Bayles Date: Thu, 9 Apr 2026 11:05:57 -0700 Subject: [PATCH 06/27] docs: update amalgamation instructions and add github action (#1677) The amalgamation approach is not outdated and works perfectly out-of-the-box. This updates the README to remove the 'possibly-outdated' warning and replaces it with direct, simple instructions for generating the amalgamated source files. A new GitHub Action workflow (`.github/workflows/amalgamate.yml`) has also been added to ensure the `amalgamate.py` script is run on every commit and that the resulting amalgamated C++ source files successfully compile, preventing any future regressions in the single-header distribution method. --- .github/workflows/amalgamate.yml | 39 ++++++++++++++++++++++++++++++++ README.md | 11 ++++++--- 2 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/amalgamate.yml diff --git a/.github/workflows/amalgamate.yml b/.github/workflows/amalgamate.yml new file mode 100644 index 000000000..e8a55d428 --- /dev/null +++ b/.github/workflows/amalgamate.yml @@ -0,0 +1,39 @@ +name: Amalgamation + +on: [check_run, push, pull_request] + +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + +jobs: + amalgamation: + runs-on: ubuntu-latest + + steps: + - name: checkout project + uses: actions/checkout@v4 + + - name: setup python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: run amalgamate script + run: | + python amalgamate.py + + - name: test compile amalgamated source + run: | + cat << 'EOF' > test_amalgamation.cpp + #include "json/json.h" + #include + + int main() { + Json::Value root; + root["hello"] = "world"; + std::cout << root.toStyledString() << std::endl; + return 0; + } + EOF + c++ -std=c++11 -I dist dist/jsoncpp.cpp test_amalgamation.cpp -o test_amalgamation + ./test_amalgamation \ No newline at end of file diff --git a/README.md b/README.md index 25b2d2b83..fe2b4f956 100644 --- a/README.md +++ b/README.md @@ -88,10 +88,15 @@ meson wrap install jsoncpp ### Amalgamated source -> [!NOTE] -> This approach may be outdated. +For projects requiring a single-header approach, JsonCpp provides a script to generate an amalgamated source and header file. + +You can generate the amalgamated files by running the following Python script from the top-level directory: + +```sh +python3 amalgamate.py +``` -For projects requiring a single-header approach, see the [Wiki entry](https://github.com/open-source-parsers/jsoncpp/wiki/Amalgamated-(Possibly-outdated)). +This will generate a `dist` directory containing `jsoncpp.cpp`, `json/json.h`, and `json/json-forwards.h`. You can then drop these files directly into your project's source tree and compile `jsoncpp.cpp` alongside your other source files. ## Documentation From 941802d466ff6117508e326025720b74d67636f0 Mon Sep 17 00:00:00 2001 From: Jordan Bayles Date: Thu, 9 Apr 2026 11:42:28 -0700 Subject: [PATCH 07/27] feat: add Json::version() to expose runtime version (#1531) (#1678) This adds a runtime function `Json::version()` that returns the `JSONCPP_VERSION_STRING`. This allows a program using jsoncpp to display the version information of the runtime linked shared library, or check at runtime that the version of the shared library is compatible with what the program expects. Fixes #1531 --- include/json/config.h | 1 + src/lib_json/json_value.cpp | 2 ++ src/test_lib_json/main.cpp | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/include/json/config.h b/include/json/config.h index 6971fa656..4619e93bd 100644 --- a/include/json/config.h +++ b/include/json/config.h @@ -105,6 +105,7 @@ extern JSON_API int msvc_pre1900_c99_snprintf(char* outBuf, size_t size, #endif // if !defined(JSON_IS_AMALGAMATION) namespace Json { +JSON_API const char* version(); using Int = int; using UInt = unsigned int; #if defined(JSON_NO_INT64) diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp index a812ea4d3..168251ee1 100644 --- a/src/lib_json/json_value.cpp +++ b/src/lib_json/json_value.cpp @@ -1704,4 +1704,6 @@ Value& Path::make(Value& root) const { return *node; } +const char* version() { return JSONCPP_VERSION_STRING; } + } // namespace Json diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp index d6938c1d0..4c000fa9b 100644 --- a/src/test_lib_json/main.cpp +++ b/src/test_lib_json/main.cpp @@ -4188,6 +4188,11 @@ JSONTEST_FIXTURE_LOCAL(VersionTest, VersionNumbersMatch) { JSONTEST_ASSERT_EQUAL(vstr.str(), std::string(JSONCPP_VERSION_STRING)); } +JSONTEST_FIXTURE_LOCAL(VersionTest, RuntimeVersionString) { + JSONTEST_ASSERT_EQUAL(std::string(JSONCPP_VERSION_STRING), + std::string(Json::version())); +} + #if defined(__GNUC__) #pragma GCC diagnostic pop #endif From 64f54a4cfe4af4db1567672e24b033e051706536 Mon Sep 17 00:00:00 2001 From: Jordan Bayles Date: Thu, 23 Apr 2026 16:20:58 -0700 Subject: [PATCH 08/27] feat: add .members() iterator adapter for range-based for loops (#288) (#1679) * feat: add .members() iterator adapter for range-based for loops (#288) This adds a zero-allocation iterator adapter to `Json::Value` that enables idiomatic range-based for loops over object members. This allows iterating over key-value pairs without allocating a vector of keys via `getMemberNames()`, and cleanly supports C++17 structured bindings (e.g. `for (const auto& [name, val] : obj.members())`). Fixes #288 * run ninja format --- .github/workflows/abi-compatibility.yml | 13 ++- .github/workflows/cmake.yml | 3 + include/json/forwards.h | 2 + include/json/value.h | 130 ++++++++++++++++++++++++ src/test_lib_json/main.cpp | 48 +++++++++ 5 files changed, 194 insertions(+), 2 deletions(-) diff --git a/.github/workflows/abi-compatibility.yml b/.github/workflows/abi-compatibility.yml index 881c4e8e0..1351c09d4 100644 --- a/.github/workflows/abi-compatibility.yml +++ b/.github/workflows/abi-compatibility.yml @@ -15,10 +15,18 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] shared_libs: [ON, OFF] include: + - jsoncpp_std: 11 + app_std: 17 + - jsoncpp_std: 17 + app_std: 11 - jsoncpp_std: 11 app_std: 23 - jsoncpp_std: 23 app_std: 11 + - jsoncpp_std: 17 + app_std: 23 + - jsoncpp_std: 23 + app_std: 17 steps: - name: checkout project @@ -47,11 +55,12 @@ jobs: find_package(jsoncpp REQUIRED CONFIG) - add_executable(abi_test stringView.cpp) + add_executable(abi_test jsontest.cpp fuzz.cpp main.cpp) target_link_libraries(abi_test PRIVATE JsonCpp::JsonCpp) EOF - cp $GITHUB_WORKSPACE/example/stringView/stringView.cpp example-app/stringView.cpp + cp src/test_lib_json/*.cpp example-app/ + cp src/test_lib_json/*.h example-app/ - name: build example app (C++${{ matrix.app_std }}) shell: bash diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 55452ac25..2b2666d36 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -12,6 +12,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] + cxx_standard: [11, 17] steps: - name: checkout project @@ -19,4 +20,6 @@ jobs: - name: build project uses: threeal/cmake-action@v2.0.0 + with: + options: CMAKE_CXX_STANDARD=${{ matrix.cxx_standard }} diff --git a/include/json/forwards.h b/include/json/forwards.h index affe33a7f..2887bdd78 100644 --- a/include/json/forwards.h +++ b/include/json/forwards.h @@ -37,6 +37,8 @@ class Value; class ValueIteratorBase; class ValueIterator; class ValueConstIterator; +class ValueMembersView; +class ValueConstMembersView; } // namespace Json diff --git a/include/json/value.h b/include/json/value.h index 2007e6b42..f14a71ce5 100644 --- a/include/json/value.h +++ b/include/json/value.h @@ -682,6 +682,11 @@ class JSON_API Value { iterator begin(); iterator end(); + // \brief Returns a view of member pairs for range-based for loops. + ValueMembersView members(); + // \brief Returns a view of member pairs for range-based for loops. + ValueConstMembersView members() const; + /// \brief Returns a reference to the first element in the `Value`. /// Requires that this value holds an array or json object, with at least one /// element. @@ -1040,6 +1045,131 @@ class JSON_API ValueIterator : public ValueIteratorBase { pointer operator->() const { return const_cast(&deref()); } }; +/** \brief Proxy struct to enable range-based for loops over object members. + */ +struct MemberProxy { + const String name; + Value& value; +}; + +/** \brief Proxy struct to enable range-based for loops over const object + * members. + */ +struct ConstMemberProxy { + const String name; + const Value& value; +}; + +/** \brief Iterator adapter for range-based for loops. + */ +class ValueMembersIterator { +public: + using iterator_category = std::forward_iterator_tag; + using value_type = MemberProxy; + using difference_type = int; + using pointer = MemberProxy*; + using reference = MemberProxy; + + ValueMembersIterator() = default; + explicit ValueMembersIterator(ValueIterator const& iter) : it_(iter) {} + + ValueMembersIterator& operator++() { + ++it_; + return *this; + } + ValueMembersIterator operator++(int) { + ValueMembersIterator temp(*this); + ++*this; + return temp; + } + bool operator==(ValueMembersIterator const& other) const { + return it_ == other.it_; + } + bool operator!=(ValueMembersIterator const& other) const { + return it_ != other.it_; + } + MemberProxy operator*() const { return MemberProxy{it_.name(), *it_}; } + +private: + ValueIterator it_; +}; + +/** \brief Iterator adapter for range-based for loops. + */ +class ValueConstMembersIterator { +public: + using iterator_category = std::forward_iterator_tag; + using value_type = ConstMemberProxy; + using difference_type = int; + using pointer = ConstMemberProxy*; + using reference = ConstMemberProxy; + + ValueConstMembersIterator() = default; + explicit ValueConstMembersIterator(ValueConstIterator const& iter) + : it_(iter) {} + + ValueConstMembersIterator& operator++() { + ++it_; + return *this; + } + ValueConstMembersIterator operator++(int) { + ValueConstMembersIterator temp(*this); + ++*this; + return temp; + } + bool operator==(ValueConstMembersIterator const& other) const { + return it_ == other.it_; + } + bool operator!=(ValueConstMembersIterator const& other) const { + return it_ != other.it_; + } + ConstMemberProxy operator*() const { + return ConstMemberProxy{it_.name(), *it_}; + } + +private: + ValueConstIterator it_; +}; + +/** \brief Range-based for loop adapter for object members. + */ +class ValueMembersView { +public: + ValueMembersView(ValueIterator begin, ValueIterator end) + : begin_(begin), end_(end) {} + ValueMembersIterator begin() const { return ValueMembersIterator(begin_); } + ValueMembersIterator end() const { return ValueMembersIterator(end_); } + +private: + ValueIterator begin_; + ValueIterator end_; +}; + +/** \brief Range-based for loop adapter for object members. + */ +class ValueConstMembersView { +public: + ValueConstMembersView(ValueConstIterator begin, ValueConstIterator end) + : begin_(begin), end_(end) {} + ValueConstMembersIterator begin() const { + return ValueConstMembersIterator(begin_); + } + ValueConstMembersIterator end() const { + return ValueConstMembersIterator(end_); + } + +private: + ValueConstIterator begin_; + ValueConstIterator end_; +}; + +inline ValueMembersView Value::members() { + return ValueMembersView(begin(), end()); +} +inline ValueConstMembersView Value::members() const { + return ValueConstMembersView(begin(), end()); +} + inline void swap(Value& a, Value& b) { a.swap(b); } inline const Value& Value::front() const { return *begin(); } diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp index 4c000fa9b..501aba10e 100644 --- a/src/test_lib_json/main.cpp +++ b/src/test_lib_json/main.cpp @@ -3924,6 +3924,54 @@ JSONTEST_FIXTURE_LOCAL(BomTest, notSkipBom) { struct IteratorTest : JsonTest::TestCase {}; +JSONTEST_FIXTURE_LOCAL(IteratorTest, members) { + Json::Value j; + j["k1"] = "a"; + j["k2"] = "b"; + + std::vector keys; + std::vector values; + + for (const auto& member : j.members()) { + keys.push_back(member.name); + values.push_back(member.value.asString()); + } + + JSONTEST_ASSERT((keys == std::vector{"k1", "k2"})); + JSONTEST_ASSERT((values == std::vector{"a", "b"})); + + // Test modification through value reference + for (const auto& member : j.members()) { + member.value = "c"; + } + + JSONTEST_ASSERT(j["k1"].asString() == "c"); + + // Test const members + const Json::Value& cj = j; + keys.clear(); + values.clear(); + + for (const auto& member : cj.members()) { + keys.push_back(member.name); + values.push_back(member.value.asString()); + } + + JSONTEST_ASSERT((keys == std::vector{"k1", "k2"})); + JSONTEST_ASSERT((values == std::vector{"c", "c"})); + +#if __cplusplus >= 201703L + keys.clear(); + values.clear(); + for (auto const& [k, v] : cj.members()) { + keys.push_back(k); + values.push_back(v.asString()); + } + JSONTEST_ASSERT((keys == std::vector{"k1", "k2"})); + JSONTEST_ASSERT((values == std::vector{"c", "c"})); +#endif +} + JSONTEST_FIXTURE_LOCAL(IteratorTest, convert) { Json::Value j; const Json::Value& cj = j; From 755d0a69d7109d465db6196a3c7e1c6f3c62a48f Mon Sep 17 00:00:00 2001 From: Jordan Bayles Date: Thu, 23 Apr 2026 16:34:58 -0700 Subject: [PATCH 09/27] Improve formatting (#1680) * style: format the entire library using clang-format Updated `reformat.sh` to include the `include` and `example` directories, as well as `.inl` files, and ran it across the repository to ensure consistent code styling throughout the library. * ci: fix directory name in clang-format workflow The workflow was checking the `examples` directory, but the directory is actually named `example`. This updates the matrix path to ensure the example files are properly checked during CI. --- .github/workflows/clang-format.yml | 2 +- reformat.sh | 2 +- src/lib_json/json_valueiterator.inl | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index eca3c31f5..ae3096302 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -12,7 +12,7 @@ jobs: matrix: path: - 'src' - - 'examples' + - 'example' - 'include' steps: - uses: actions/checkout@v4 diff --git a/reformat.sh b/reformat.sh index cdc03b1ea..86bc066f1 100755 --- a/reformat.sh +++ b/reformat.sh @@ -1 +1 @@ -find src -name '*.cpp' -or -name '*.h' | xargs clang-format -i +find src include example -name '*.cpp' -or -name '*.h' -or -name '*.inl' | xargs clang-format -i diff --git a/src/lib_json/json_valueiterator.inl b/src/lib_json/json_valueiterator.inl index d6128b8ed..4e77f368b 100644 --- a/src/lib_json/json_valueiterator.inl +++ b/src/lib_json/json_valueiterator.inl @@ -122,8 +122,8 @@ ValueConstIterator::ValueConstIterator( ValueConstIterator::ValueConstIterator(ValueIterator const& other) : ValueIteratorBase(other) {} -ValueConstIterator& ValueConstIterator:: -operator=(const ValueIteratorBase& other) { +ValueConstIterator& +ValueConstIterator::operator=(const ValueIteratorBase& other) { copy(other); return *this; } From 4f7d46f86abfe00d4697c62ea063d098cac9b4e5 Mon Sep 17 00:00:00 2001 From: Jordan Bayles Date: Thu, 14 May 2026 15:51:42 -0700 Subject: [PATCH 10/27] docs: remove conan and vcpkg instructions from README (#1683) --- README.md | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/README.md b/README.md index fe2b4f956..2cbf00b30 100644 --- a/README.md +++ b/README.md @@ -52,34 +52,6 @@ Major versions maintain binary compatibility. Critical security fixes are accept > [!NOTE] > Package manager ports (vcpkg, Conan, etc.) are community-maintained. Please report outdated versions or missing generators to their respective repositories. -### vcpkg -Add `jsoncpp` to your `vcpkg.json` manifest: - -```json -{ - "dependencies": ["jsoncpp"] -} -``` - -Or install via classic mode: `vcpkg install jsoncpp`. - -### Conan - -```sh -conan install --requires="jsoncpp/[*]" --build=missing -``` - -If you are using a `conanfile.txt` in a Conan 2 project, ensure you use the appropriate generators: - -```ini -[requires] -jsoncpp/[*] - -[generators] -CMakeToolchain -CMakeDeps -``` - ### Meson ```sh From 71d46ca38e90dc902e8178ba484af4f27fa11947 Mon Sep 17 00:00:00 2001 From: Jordan Bayles Date: Thu, 14 May 2026 15:57:53 -0700 Subject: [PATCH 11/27] fix: GCC 16 / C++20 build failure with u8 string literals (#1685) * fix: GCC 16 / C++20 build failure with u8 string literals (#1684) In C++20, the `u8""` string literal prefix was changed to evaluate to `const char8_t[]` instead of `const char[]`. This caused compilation errors when these literals were implicitly converted to `std::string` or passed to functions expecting `const char*`. This commit adds `reinterpret_cast` around the `u8` string literals in the test suite to resolve the build errors while maintaining the intended UTF-8 semantics. Additionally, this adds C++20 to the GitHub Actions CMake test matrix to ensure we don't regress on newer standards. Fixes #1684 * style: run clang-format --- .github/workflows/cmake.yml | 2 +- src/test_lib_json/main.cpp | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 2b2666d36..a4d8465f9 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - cxx_standard: [11, 17] + cxx_standard: [11, 17, 20] steps: - name: checkout project diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp index 501aba10e..08731f66a 100644 --- a/src/test_lib_json/main.cpp +++ b/src/test_lib_json/main.cpp @@ -1993,7 +1993,8 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, StaticString) { JSONTEST_FIXTURE_LOCAL(ValueTest, WideString) { // https://github.com/open-source-parsers/jsoncpp/issues/756 - const std::string uni = u8"\u5f0f\uff0c\u8fdb"; // "式,进" + const std::string uni = + reinterpret_cast(u8"\u5f0f\uff0c\u8fdb"); // "式,进" std::string styled; { Json::Value v; @@ -3109,9 +3110,9 @@ JSONTEST_FIXTURE_LOCAL(ReaderTest, strictModeParseNumber) { } JSONTEST_FIXTURE_LOCAL(ReaderTest, parseChineseWithOneError) { - checkParse(R"({ "pr)" - u8"\u4f50\u85e4" // 佐藤 - R"(erty" :: "value" })", + checkParse(reinterpret_cast(R"({ "pr)" + u8"\u4f50\u85e4" // 佐藤 + R"(erty" :: "value" })"), {{18, 19, "Syntax error: value, object or array expected."}}, "* Line 1, Column 19\n Syntax error: value, object or array " "expected.\n"); @@ -3223,7 +3224,8 @@ JSONTEST_FIXTURE_LOCAL(CharReaderTest, parseString) { bool ok = reader->parse(doc, doc + std::strlen(doc), &root, &errs); JSONTEST_ASSERT(ok); JSONTEST_ASSERT(errs.empty()); - JSONTEST_ASSERT_EQUAL(u8"\u8A2a", root[0].asString()); // "訪" + JSONTEST_ASSERT_EQUAL(reinterpret_cast(u8"\u8A2a"), + root[0].asString()); // "訪" } { char const doc[] = R"([ "\uD801" ])"; From d4d072177213b117fb81d4cfda140de090616161 Mon Sep 17 00:00:00 2001 From: Jordan Bayles Date: Thu, 14 May 2026 16:14:02 -0700 Subject: [PATCH 12/27] feat: improve type assertion messages with actual ValueType (#1686) * feat: improve type assertion messages with actual ValueType (#1627) When indexing into a Json::Value, several assertions check that the value is an object or array. This commit enhances the error messages by reporting the actual type found, making it easier for users to debug type mismatch issues. Fixes #1627 * style: run clang-format --- src/lib_json/json_value.cpp | 51 ++++++++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp index 168251ee1..ac881094e 100644 --- a/src/lib_json/json_value.cpp +++ b/src/lib_json/json_value.cpp @@ -193,6 +193,32 @@ static inline void releaseStringValue(char* value, unsigned) { free(value); } // ValueInternals... // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// + +namespace Json { + +static const char* valueTypeToString(ValueType type) { + switch (type) { + case nullValue: + return "nullValue"; + case intValue: + return "intValue"; + case uintValue: + return "uintValue"; + case realValue: + return "realValue"; + case stringValue: + return "stringValue"; + case booleanValue: + return "booleanValue"; + case arrayValue: + return "arrayValue"; + case objectValue: + return "objectValue"; + } + return "unknown"; +} + +} // namespace Json // ////////////////////////////////////////////////////////////////// #if !defined(JSON_IS_AMALGAMATION) @@ -928,8 +954,10 @@ void Value::clear() { } void Value::resize(ArrayIndex newSize) { - JSON_ASSERT_MESSAGE(type() == nullValue || type() == arrayValue, - "in Json::Value::resize(): requires arrayValue"); + JSON_ASSERT_MESSAGE( + type() == nullValue || type() == arrayValue, + "in Json::Value::resize(): requires arrayValue, but found " + << valueTypeToString(type())); if (type() == nullValue) *this = Value(arrayValue); ArrayIndex oldSize = size(); @@ -1062,7 +1090,8 @@ void Value::dupMeta(const Value& other) { Value& Value::resolveReference(const char* key) { JSON_ASSERT_MESSAGE( type() == nullValue || type() == objectValue, - "in Json::Value::resolveReference(): requires objectValue"); + "in Json::Value::resolveReference(): requires objectValue, but found " + << valueTypeToString(type())); if (type() == nullValue) *this = Value(objectValue); CZString actualKey(key, static_cast(strlen(key)), @@ -1079,9 +1108,10 @@ Value& Value::resolveReference(const char* key) { // @param key is not null-terminated. Value& Value::resolveReference(char const* key, char const* end) { - JSON_ASSERT_MESSAGE( - type() == nullValue || type() == objectValue, - "in Json::Value::resolveReference(key, end): requires objectValue"); + JSON_ASSERT_MESSAGE(type() == nullValue || type() == objectValue, + "in Json::Value::resolveReference(key, end): requires " + "objectValue, but found " + << valueTypeToString(type())); if (type() == nullValue) *this = Value(objectValue); CZString actualKey(key, static_cast(end - key), @@ -1192,7 +1222,8 @@ Value& Value::append(const Value& value) { return append(Value(value)); } Value& Value::append(Value&& value) { JSON_ASSERT_MESSAGE(type() == nullValue || type() == arrayValue, - "in Json::Value::append: requires arrayValue"); + "in Json::Value::append: requires arrayValue, but found " + << valueTypeToString(type())); if (type() == nullValue) { *this = Value(arrayValue); } @@ -1251,8 +1282,10 @@ bool Value::removeMember(String const& key, Value* removed) { } void Value::removeMember(const char* key) { - JSON_ASSERT_MESSAGE(type() == nullValue || type() == objectValue, - "in Json::Value::removeMember(): requires objectValue"); + JSON_ASSERT_MESSAGE( + type() == nullValue || type() == objectValue, + "in Json::Value::removeMember(): requires objectValue, but found " + << valueTypeToString(type())); if (type() == nullValue) return; From 8519b8381f3c741ad1421f88237b1deda0b11412 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Sun, 14 Jun 2026 05:16:10 +0200 Subject: [PATCH 13/27] fix: avoid quadratic re-scan of comments after a value (#1689) * fix: avoid quadratic re-scan of comments after a value OurReader::readComment() decides whether a comment should be attached to the previous value (commentAfterOnSameLine) by scanning the input from the end of that value up to the comment with containsNewLine(). lastValueEnd_ only advances when a new value is read, so a long run of comments after a value (e.g. during error recovery, or a value followed by many comments) made every comment re-scan the same growing prefix, giving O(n^2) parse time. A jsoncpp_fuzzer testcase took ~18s for a 400KB input. A comment can only ever be on the same line as the last value if no newline separates them, and the gap to inspect only grows as further comments are consumed, so once the gap has been examined for the first comment it never needs to be examined again. Mark lastValueHasAComment_ after the first comment following a value so subsequent comments skip the scan. Parsing the testcase drops from ~18s to ~56ms with identical output. Add a regression test that parses a value followed by a large number of trailing comments and requires it to complete well under a generous time bound. * test: assert linear comment scanning deterministically Replace the wall-clock bound in the comment regression test with a direct, deterministic assertion on work done. The parse output is identical with and without the fix, so the only observable difference is how much the parser scans; a time bound is also flaky under valgrind/sanitizers/loaded CI. Add an instrumentation counter for the bytes examined by OurReader::containsNewLine, exposed via a JSON_API seam, and assert it stays linear in the input (scanned < 4 * doc.size()) rather than O(comments * gap). The counter is thread_local (no race during concurrent parsing) and the increment is negligible, running only while parsing comments. It is compiled unconditionally because the ABI compatibility job builds the test suite against a separately-installed Release library, so the symbol must exist there. Rename the test to parseCommentsAfterValueScansLinearly to describe what it checks, and link crbug.com/521541633. Verified: the test fails when the fix is reverted and passes with it, in Debug and Release, and the seam links against a Release-installed shared library (the ABI compatibility scenario). --------- Co-authored-by: Jordan Bayles --- src/lib_json/json_reader.cpp | 18 +++++++++++++++- src/test_lib_json/main.cpp | 41 ++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/src/lib_json/json_reader.cpp b/src/lib_json/json_reader.cpp index 83743f73b..39ebcc6b5 100644 --- a/src/lib_json/json_reader.cpp +++ b/src/lib_json/json_reader.cpp @@ -975,8 +975,20 @@ class OurReader { // complete copy of Read impl, for OurReader +// Test-only instrumentation: total bytes examined by +// OurReader::containsNewLine, so unit tests can assert that comment handling +// stays linear in the input rather than quadratic in the comment count (see +// CharReaderTest/parseCommentsAfterValueScansLinearly). thread_local so it +// never races during concurrent parsing; the increment is negligible and only +// runs while parsing comments. Not part of the supported public API. +JSON_API size_t& newlineScanByteCountForTesting() { + static thread_local size_t count = 0; + return count; +} + bool OurReader::containsNewLine(OurReader::Location begin, OurReader::Location end) { + newlineScanByteCountForTesting() += static_cast(end - begin); return std::any_of(begin, end, [](char b) { return b == '\n' || b == '\r'; }); } @@ -1296,9 +1308,13 @@ bool OurReader::readComment() { if (lastValueEnd_ && !containsNewLine(lastValueEnd_, commentBegin)) { if (isCppStyleComment || !cStyleWithEmbeddedNewline) { placement = commentAfterOnSameLine; - lastValueHasAComment_ = true; } } + // The gap between the last value and this comment only grows as more + // comments are consumed, so a later comment can never be on the same + // line as that value. Mark it handled to avoid re-scanning the same + // growing prefix for every following comment (quadratic behavior). + lastValueHasAComment_ = true; } addComment(commentBegin, current_, placement); diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp index 08731f66a..9d13fdbe4 100644 --- a/src/test_lib_json/main.cpp +++ b/src/test_lib_json/main.cpp @@ -29,6 +29,11 @@ using CharReaderPtr = std::unique_ptr; +namespace Json { +// Defined in json_reader.cpp; test instrumentation seam. +JSON_API size_t& newlineScanByteCountForTesting(); +} // namespace Json + // Make numeric limits more convenient to talk about. // Assumes int type in 32 bits. #define kint32max Json::Value::maxInt @@ -3308,6 +3313,42 @@ JSONTEST_FIXTURE_LOCAL(CharReaderTest, parseComment) { } } +JSONTEST_FIXTURE_LOCAL(CharReaderTest, parseCommentsAfterValueScansLinearly) { + // A value, then a comment whose only newline is at its end, then many + // trailing comments. Comment handling should scan the value->comment gap a + // bounded number of times (linear in the input), not once per trailing + // comment (O(comments * gap)). Assert directly on bytes scanned + // (deterministic) rather than wall-clock time (flaky under valgrind/CI). + // + // Regression test for crbug.com/521541633 (jsoncpp_fuzzer timeout: a 400KB + // input scanned 2.24GB across 8384 containsNewLine calls, ~18s). + const int kFiller = 256; + const int kComments = 1000; + std::string doc = "[0 /*"; + doc.append(kFiller, 'a'); + doc += "\n*/"; + for (int i = 0; i < kComments; ++i) + doc += "/*c*/"; + doc += "]"; + + Json::CharReaderBuilder b; + CharReaderPtr reader(b.newCharReader()); + Json::Value root; + Json::String errs; + + Json::newlineScanByteCountForTesting() = 0; + const bool ok = + reader->parse(doc.data(), doc.data() + doc.size(), &root, &errs); + + JSONTEST_ASSERT(ok); + JSONTEST_ASSERT(errs.empty()); + JSONTEST_ASSERT_EQUAL(0, root[0]); + // Quadratic-regression guard. Linear scans ~O(input); the bug scanned + // ~kComments * kFiller (~2.7M here vs a few bytes fixed). + const size_t scanned = Json::newlineScanByteCountForTesting(); + JSONTEST_ASSERT(scanned < 4 * doc.size()); +} + JSONTEST_FIXTURE_LOCAL(CharReaderTest, parseObjectWithErrors) { Json::CharReaderBuilder b; CharReaderPtr reader(b.newCharReader()); From 8281fffdecb6c3c51755424741c1e6a0c4dca640 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 13 Jun 2026 21:11:21 -0700 Subject: [PATCH 14/27] chore: bump version to 1.9.9 (#1690) Co-authored-by: baylesj <1357263+baylesj@users.noreply.github.com> --- CMakeLists.txt | 2 +- MODULE.bazel | 2 +- include/json/version.h | 4 ++-- meson.build | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c1de7aefc..b2335b580 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,7 +57,7 @@ project(jsoncpp # 3. ./CMakeLists.txt # 4. ./MODULE.bazel # IMPORTANT: also update the PROJECT_SOVERSION!! - VERSION 1.9.8 # [.[.[.]]] + VERSION 1.9.9 # [.[.[.]]] LANGUAGES CXX) message(STATUS "JsonCpp Version: ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") diff --git a/MODULE.bazel b/MODULE.bazel index 25b8bfc8c..ad09c20f7 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -9,7 +9,7 @@ module( # 3. /CMakeLists.txt # 4. /MODULE.bazel # IMPORTANT: also update the SOVERSION!! - version = "1.9.8", + version = "1.9.9", compatibility_level = 1, ) diff --git a/include/json/version.h b/include/json/version.h index 1579c7807..ff435d58d 100644 --- a/include/json/version.h +++ b/include/json/version.h @@ -10,10 +10,10 @@ // 4. /MODULE.bazel // IMPORTANT: also update the SOVERSION!! -#define JSONCPP_VERSION_STRING "1.9.8" +#define JSONCPP_VERSION_STRING "1.9.9" #define JSONCPP_VERSION_MAJOR 1 #define JSONCPP_VERSION_MINOR 9 -#define JSONCPP_VERSION_PATCH 8 +#define JSONCPP_VERSION_PATCH 9 #define JSONCPP_VERSION_HEXA \ ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | \ (JSONCPP_VERSION_PATCH << 8)) diff --git a/meson.build b/meson.build index e08314bcd..2cd0b5d33 100644 --- a/meson.build +++ b/meson.build @@ -10,7 +10,7 @@ project( # 3. /CMakeLists.txt # 4. /MODULE.bazel # IMPORTANT: also update the SOVERSION!! - version : '1.9.8', + version : '1.9.9', default_options : [ 'buildtype=release', 'cpp_std=c++11', From 5f1f240f10a19a61929b5c573974900cb62e9dac Mon Sep 17 00:00:00 2001 From: Jordan Bayles Date: Sat, 13 Jun 2026 21:24:24 -0700 Subject: [PATCH 15/27] ci: bump actions off deprecated Node 20 (#1691) GitHub Actions reports that actions/checkout@v4 and peter-evans/create-pull-request@v7 target Node 20, which is deprecated and currently force-run on Node 24. Bump them to versions that natively target Node 24: - actions/checkout v4 -> v5 (the Node 20 -> 24 transition; v6's only notable change is moving credentials to a separate file, unneeded here) - peter-evans/create-pull-request v7 -> v8 (Node 24 bump only; inputs unchanged) The other actions in these workflows were not flagged and already run on Node 24. --- .github/workflows/abi-compatibility.yml | 2 +- .github/workflows/amalgamate.yml | 2 +- .github/workflows/clang-format.yml | 2 +- .github/workflows/cmake.yml | 2 +- .github/workflows/meson.yml | 4 ++-- .github/workflows/update-project-version.yml | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/abi-compatibility.yml b/.github/workflows/abi-compatibility.yml index 1351c09d4..855ccbc18 100644 --- a/.github/workflows/abi-compatibility.yml +++ b/.github/workflows/abi-compatibility.yml @@ -30,7 +30,7 @@ jobs: steps: - name: checkout project - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: build and install JsonCpp (C++${{ matrix.jsoncpp_std }}) shell: bash diff --git a/.github/workflows/amalgamate.yml b/.github/workflows/amalgamate.yml index e8a55d428..76006218e 100644 --- a/.github/workflows/amalgamate.yml +++ b/.github/workflows/amalgamate.yml @@ -11,7 +11,7 @@ jobs: steps: - name: checkout project - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: setup python uses: actions/setup-python@v5 diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index ae3096302..fd527c12c 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -15,7 +15,7 @@ jobs: - 'example' - 'include' steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: runs clang-format style check for C/C++/Protobuf programs. uses: jidicula/clang-format-action@v4.13.0 with: diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index a4d8465f9..cccf8ed6c 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -16,7 +16,7 @@ jobs: steps: - name: checkout project - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: build project uses: threeal/cmake-action@v2.0.0 diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index 92d04862f..cacfc2163 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -16,7 +16,7 @@ jobs: steps: - name: checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: setup python uses: actions/setup-python@v5 @@ -42,7 +42,7 @@ jobs: steps: - name: checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: setup python uses: actions/setup-python@v5 diff --git a/.github/workflows/update-project-version.yml b/.github/workflows/update-project-version.yml index c47e53790..9091fc38f 100644 --- a/.github/workflows/update-project-version.yml +++ b/.github/workflows/update-project-version.yml @@ -22,7 +22,7 @@ jobs: pull-requests: write steps: - name: checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: update project files run: | @@ -102,7 +102,7 @@ jobs: fi - name: create pull request - uses: peter-evans/create-pull-request@v7 + uses: peter-evans/create-pull-request@v8 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: "chore: bump version to ${{ github.event.inputs.target_version }}" From 43f3834e3ffd903370c504e357461e407b3d3983 Mon Sep 17 00:00:00 2001 From: Jordan Bayles Date: Tue, 16 Jun 2026 14:40:21 -0700 Subject: [PATCH 16/27] fix: make array operator[] dense when assigning past the end (#1611) (#1693) * fix: make array operator[] dense when assigning past the end (#1611) Value::operator[](ArrayIndex) only inserted the requested index, so `arr[5] = x` on an empty array stored a single element while size() reported 6 (highest index + 1) and serialization emitted six elements (missing indices written as null). Range-for iteration walked the underlying sparse map and therefore visited only the one populated element -- inconsistent with both size() and the serialized output. JSON arrays are dense, so materialize the intervening indices as null when assigning beyond the current end, exactly as resize() already does when growing. Iteration, size(), equality, and serialization now agree. Note: this is a behavior change (arrays are now dense in memory after a sparse-looking assignment), so it targets the 1.10.0 minor release rather than a 1.9.x patch. It is ABI-compatible (no signature or layout change), so SOVERSION is unchanged. * chore: bump version to 1.10.0 master becomes the 1.10 line. The #1611 array fix changes runtime behavior (dense arrays) for existing valid code, so the next release is a minor bump, not a 1.9.x patch. SOVERSION stays at 27 (ABI unchanged). --- CMakeLists.txt | 2 +- MODULE.bazel | 2 +- include/json/version.h | 6 +++--- meson.build | 2 +- src/lib_json/json_value.cpp | 9 +++++++++ src/test_lib_json/main.cpp | 29 +++++++++++++++++++++++++++++ 6 files changed, 44 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b2335b580..d8e6d4cfa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,7 +57,7 @@ project(jsoncpp # 3. ./CMakeLists.txt # 4. ./MODULE.bazel # IMPORTANT: also update the PROJECT_SOVERSION!! - VERSION 1.9.9 # [.[.[.]]] + VERSION 1.10.0 # [.[.[.]]] LANGUAGES CXX) message(STATUS "JsonCpp Version: ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") diff --git a/MODULE.bazel b/MODULE.bazel index ad09c20f7..09607241b 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -9,7 +9,7 @@ module( # 3. /CMakeLists.txt # 4. /MODULE.bazel # IMPORTANT: also update the SOVERSION!! - version = "1.9.9", + version = "1.10.0", compatibility_level = 1, ) diff --git a/include/json/version.h b/include/json/version.h index ff435d58d..2068ba011 100644 --- a/include/json/version.h +++ b/include/json/version.h @@ -10,10 +10,10 @@ // 4. /MODULE.bazel // IMPORTANT: also update the SOVERSION!! -#define JSONCPP_VERSION_STRING "1.9.9" +#define JSONCPP_VERSION_STRING "1.10.0" #define JSONCPP_VERSION_MAJOR 1 -#define JSONCPP_VERSION_MINOR 9 -#define JSONCPP_VERSION_PATCH 9 +#define JSONCPP_VERSION_MINOR 10 +#define JSONCPP_VERSION_PATCH 0 #define JSONCPP_VERSION_HEXA \ ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | \ (JSONCPP_VERSION_PATCH << 8)) diff --git a/meson.build b/meson.build index 2cd0b5d33..380b7e2bd 100644 --- a/meson.build +++ b/meson.build @@ -10,7 +10,7 @@ project( # 3. /CMakeLists.txt # 4. /MODULE.bazel # IMPORTANT: also update the SOVERSION!! - version : '1.9.9', + version : '1.10.0', default_options : [ 'buildtype=release', 'cpp_std=c++11', diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp index ac881094e..5823bd1d9 100644 --- a/src/lib_json/json_value.cpp +++ b/src/lib_json/json_value.cpp @@ -985,6 +985,15 @@ Value& Value::operator[](ArrayIndex index) { if (it != value_.map_->end() && (*it).first == key) return (*it).second; + // JSON arrays are dense: materialize any gap between the current size and + // `index` with null so that size(), iteration, and serialization stay + // consistent. Without this, `arr[5] = x` on an empty array would store a + // single element while size() reported 6 and serialization emitted six + // (see issue #1611). resize() already grows arrays this same way. + for (ArrayIndex i = size(); i < index; ++i) + value_.map_->insert(value_.map_->end(), + ObjectValues::value_type(CZString(i), nullSingleton())); + ObjectValues::value_type defaultValue(key, nullSingleton()); it = value_.map_->insert(it, defaultValue); return (*it).second; diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp index 9d13fdbe4..6673867dc 100644 --- a/src/test_lib_json/main.cpp +++ b/src/test_lib_json/main.cpp @@ -524,6 +524,35 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, resizePopulatesAllMissingElements) { JSONTEST_ASSERT_EQUAL(e, Json::Value{}); } +JSONTEST_FIXTURE_LOCAL(ValueTest, assignBeyondEndPopulatesGapsWithNull) { + // Regression test for #1611: assigning past the end of an array via + // operator[] must fill the intervening indices with null, so that size(), + // iteration, and serialization all agree (JSON arrays are dense). Before the + // fix, `arr[5] = x` stored a single element while size() reported 6 and + // serialization emitted six, and range-for visited only the one element. + Json::Value arr(Json::arrayValue); + arr[5] = "Hello, World!"; + + JSONTEST_ASSERT_EQUAL(6u, arr.size()); + JSONTEST_ASSERT_EQUAL(6, std::distance(arr.begin(), arr.end())); + for (Json::ArrayIndex i = 0; i < 5; ++i) + JSONTEST_ASSERT_EQUAL(Json::Value{}, arr[i]); + JSONTEST_ASSERT_EQUAL("Hello, World!", arr[5].asString()); + + // Iteration count matches size() and the dense serialization. + Json::ArrayIndex iterated = 0; + for (const Json::Value& e : arr) { + (void)e; + ++iterated; + } + JSONTEST_ASSERT_EQUAL(6u, iterated); + + Json::StreamWriterBuilder b; + b.settings_["indentation"] = ""; + JSONTEST_ASSERT_EQUAL("[null,null,null,null,null,\"Hello, World!\"]", + Json::writeString(b, arr)); +} + JSONTEST_FIXTURE_LOCAL(ValueTest, getArrayValue) { Json::Value array; for (Json::ArrayIndex i = 0; i < 5; i++) From 11279616cf96c81d57542d5ddabc49d4ad79a0ac Mon Sep 17 00:00:00 2001 From: Jordan Bayles Date: Tue, 16 Jun 2026 16:03:00 -0700 Subject: [PATCH 17/27] fix: accept subnormal doubles when parsing (#1427) (#1695) decodeDouble parsed numbers via `istringstream >> double`. For a subnormal value such as `3.2114e-312`, operator>> sets failbit (the result underflowed) even though it produced the correctly-rounded value. The failure path only special-cased overflow, so subnormals were rejected as "not a number" -- meaning a value jsoncpp had just serialized could fail to parse back. In the failure path, accept the value when it is a subnormal (std::fpclassify(value) == FP_SUBNORMAL). This keys off the value operator>> produces, which is the correctly-rounded subnormal on libstdc++, libc++, and MSVC, so it needs no errno/eof heuristics. It deliberately does not accept results that round to zero, so malformed numbers like "0e" / "0e+" (jsonchecker fail29/fail30) and other junk are still rejected. Applied to both Reader and OurReader. Adds CharReaderTest/parseSubnormal covering subnormals, a writer round-trip, and continued rejection of malformed numbers. --- src/lib_json/json_reader.cpp | 16 ++++++++++++-- src/test_lib_json/main.cpp | 43 ++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/src/lib_json/json_reader.cpp b/src/lib_json/json_reader.cpp index 39ebcc6b5..ce9ca1bda 100644 --- a/src/lib_json/json_reader.cpp +++ b/src/lib_json/json_reader.cpp @@ -584,7 +584,13 @@ bool Reader::decodeDouble(Token& token, Value& decoded) { value = std::numeric_limits::infinity(); else if (value == std::numeric_limits::lowest()) value = -std::numeric_limits::infinity(); - else if (!std::isinf(value)) + // operator>> sets failbit for a subnormal result (underflow) even though + // it produced the correctly-rounded value, which made such numbers fail to + // parse back after jsoncpp serialized them. Keep a subnormal value instead + // of rejecting it. See issue #1427. Other failures -- malformed numbers + // like "0e" or "0e+", or non-numbers -- leave the value at zero/non-finite + // and are still rejected. + else if (!std::isinf(value) && std::fpclassify(value) != FP_SUBNORMAL) return addError( "'" + String(token.start_, token.end_) + "' is not a number.", token); } @@ -1637,7 +1643,13 @@ bool OurReader::decodeDouble(Token& token, Value& decoded) { value = std::numeric_limits::infinity(); else if (value == std::numeric_limits::lowest()) value = -std::numeric_limits::infinity(); - else if (!std::isinf(value)) + // operator>> sets failbit for a subnormal result (underflow) even though + // it produced the correctly-rounded value, which made such numbers fail to + // parse back after jsoncpp serialized them. Keep a subnormal value instead + // of rejecting it. See issue #1427. Other failures -- malformed numbers + // like "0e" or "0e+", or non-numbers -- leave the value at zero/non-finite + // and are still rejected. + else if (!std::isinf(value) && std::fpclassify(value) != FP_SUBNORMAL) return addError( "'" + String(token.start_, token.end_) + "' is not a number.", token); } diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp index 6673867dc..495bbb51e 100644 --- a/src/test_lib_json/main.cpp +++ b/src/test_lib_json/main.cpp @@ -3241,6 +3241,49 @@ JSONTEST_FIXTURE_LOCAL(CharReaderTest, parseNumber) { } } +JSONTEST_FIXTURE_LOCAL(CharReaderTest, parseSubnormal) { + // Regression test for #1427: subnormal doubles make operator>> set failbit + // even though it produced the correctly-rounded value, so they used to fail + // to parse -- meaning a value jsoncpp had just serialized could fail to read + // back. They should now parse to that value. + Json::CharReaderBuilder b; + CharReaderPtr reader(b.newCharReader()); + Json::String errs; + + const struct { + const char* doc; + double expected; + } cases[] = { + {"[3.2114e-312]", 3.2114e-312}, // subnormal + {"[-1e-320]", -1e-320}, // negative subnormal + {"[4.9e-324]", 4.9e-324}, // smallest positive subnormal + }; + for (const auto& c : cases) { + Json::Value root; + bool ok = reader->parse(c.doc, c.doc + std::strlen(c.doc), &root, &errs); + JSONTEST_ASSERT(ok); + JSONTEST_ASSERT(errs.empty()); + JSONTEST_ASSERT_EQUAL(c.expected, root[0].asDouble()); + } + + // A subnormal also round-trips through the writer. + { + const Json::String doc = Json::writeString(Json::StreamWriterBuilder(), + Json::Value(3.2114e-312)); + Json::Value root; + bool ok = reader->parse(doc.data(), doc.data() + doc.size(), &root, &errs); + JSONTEST_ASSERT(ok); + JSONTEST_ASSERT_EQUAL(3.2114e-312, root.asDouble()); + } + + // Malformed numbers and non-numbers are still rejected (the failure path + // accepts a subnormal value but nothing that parses to zero or junk). + for (const char* doc : {"[1abc]", "[0e]", "[0e+]"}) { + Json::Value root; + JSONTEST_ASSERT(!reader->parse(doc, doc + std::strlen(doc), &root, &errs)); + } +} + JSONTEST_FIXTURE_LOCAL(CharReaderTest, parseString) { Json::CharReaderBuilder b; CharReaderPtr reader(b.newCharReader()); From 22c7ec3a05beb55810dda4e5d79b9763a21a8ddf Mon Sep 17 00:00:00 2001 From: Jordan Bayles Date: Wed, 17 Jun 2026 00:51:49 -0700 Subject: [PATCH 18/27] fix: allow a comment between a trailing comma and ']' (#1500) (#1696) Trailing commas and comments are both allowed by default, but they did not compose inside arrays: readArray detected a trailing-comma ']' with a raw `*current_ == ']'` peek that skipped only whitespace, not comments. So `[1, 2, /* c */]` left current_ at the comment, the peek failed, and the parser tried to read another value -- which hit ']' and reported "value, object or array expected". readObject already handled this via readTokenSkippingComments. Add skipCommentTokens() (skip whitespace and comments, leaving current_ at the next significant character) and use it in readArray before the ']' check. Consumed comments stay in commentsBefore_, so a comment before a real element is still attached to it; if the array ends, they are simply not attached -- matching object behavior. Adds CharReaderTest/parseTrailingCommaWithComment covering line/block comments after a trailing comma, an empty array containing only a comment, the object form, and that a comment before a real element is still attached. --- src/lib_json/json_reader.cpp | 24 +++++++++++++++++++++++- src/test_lib_json/main.cpp | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/src/lib_json/json_reader.cpp b/src/lib_json/json_reader.cpp index ce9ca1bda..164d41d6f 100644 --- a/src/lib_json/json_reader.cpp +++ b/src/lib_json/json_reader.cpp @@ -926,6 +926,7 @@ class OurReader { bool readToken(Token& token); bool readTokenSkippingComments(Token& token); void skipSpaces(); + void skipCommentTokens(); void skipBom(bool skipBom); bool match(const Char* pattern, int patternLength); bool readComment(); @@ -1269,6 +1270,24 @@ void OurReader::skipSpaces() { } } +// Skip whitespace and any comments, leaving current_ at the next significant +// character. Consumed comments are recorded (commentsBefore_) so the next value +// still receives them; if none follows they are simply not attached. This lets +// callers peek for a delimiter that is preceded by comments (e.g. a ']' after a +// trailing comma -- see readArray and issue #1500). +void OurReader::skipCommentTokens() { + skipSpaces(); + if (!features_.allowComments_) + return; + while (current_ != end_ && *current_ == '/' && (current_ + 1) != end_ && + (current_[1] == '/' || current_[1] == '*')) { + Token comment; + if (!readToken(comment)) + return; + skipSpaces(); + } +} + void OurReader::skipBom(bool skipBom) { // The default behavior is to skip BOM. if (skipBom) { @@ -1501,7 +1520,10 @@ bool OurReader::readArray(Token& token) { currentValue().setOffsetStart(token.start_ - begin_); int index = 0; for (;;) { - skipSpaces(); + // Skip comments too, so a ']' that follows a trailing comma (or comments in + // an otherwise empty array) is recognized rather than mistaken for the + // start of another value. See issue #1500. + skipCommentTokens(); if (current_ != end_ && *current_ == ']' && (index == 0 || (features_.allowTrailingCommas_ && diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp index 495bbb51e..90025b443 100644 --- a/src/test_lib_json/main.cpp +++ b/src/test_lib_json/main.cpp @@ -3385,6 +3385,39 @@ JSONTEST_FIXTURE_LOCAL(CharReaderTest, parseComment) { } } +JSONTEST_FIXTURE_LOCAL(CharReaderTest, parseTrailingCommaWithComment) { + // Regression test for #1500: trailing commas and comments are both allowed by + // default, so they must compose -- a comment between a trailing comma and the + // closing ']' must not turn a valid document into a parse error. (Objects + // already handled this; arrays did not.) + Json::CharReaderBuilder b; + CharReaderPtr reader(b.newCharReader()); + Json::Value root; + Json::String errs; + + for (const char* doc : { + "[1,2,\n// trailing\n]", // line comment after trailing comma + "[1,2,/* trailing */]", // block comment after trailing comma + "[{},\n// trailing\n]", // trailing comma after a nested value + "[\n// only a comment\n]", // empty array containing a comment + "{\"a\":1,\n// trailing\n}", // object form (guard the existing case) + }) { + bool ok = reader->parse(doc, doc + std::strlen(doc), &root, &errs); + JSONTEST_ASSERT(ok); + JSONTEST_ASSERT(errs.empty()); + } + + // A comment before a real (non-closing) element is still attached to it. + { + char const doc[] = "[1,\n// before two\n2]"; + bool ok = reader->parse(doc, doc + std::strlen(doc), &root, &errs); + JSONTEST_ASSERT(ok); + JSONTEST_ASSERT_EQUAL(2u, root.size()); + JSONTEST_ASSERT_EQUAL(2, root[1]); + JSONTEST_ASSERT(root[1].hasComment(Json::commentBefore)); + } +} + JSONTEST_FIXTURE_LOCAL(CharReaderTest, parseCommentsAfterValueScansLinearly) { // A value, then a comment whose only newline is at its end, then many // trailing comments. Comment handling should scan the value->comment gap a From 800aa28c493590c539cb7baf445016cc9b8702ef Mon Sep 17 00:00:00 2001 From: Jordan Bayles Date: Wed, 17 Jun 2026 01:07:12 -0700 Subject: [PATCH 19/27] fix: bump SOVERSION to 28 for the removed std::string_view symbols (#1694) (#1697) The std::string_view convenience methods (Value(std::string_view), getString, operator[], get, removeMember, isMember) were exported symbols in 1.9.7 -- declared in value.h and defined out-of-line in value.cpp. After 1.9.7 the #1661/#1675 ABI-mismatch fixes made them header-only `inline`, which removed those symbols from the shared library (e.g. Value::removeMember(std::string_view)), but SOVERSION stayed at 27. Removing exported symbols is an incompatible ABI change, so consumers built against 1.9.7's libjsoncpp.so.27 fail to resolve those symbols against later builds that still claim SONAME .so.27 (issue #1694: a system jsoncpp upgrade broke cmake/NFS Ganesha with an undefined-symbol error). Bump SOVERSION 27 -> 28 so the changed ABI gets a distinct SONAME; affected consumers then get a clean rebuild requirement instead of a symbol-lookup crash, and a rebuild against 1.10.0 uses the inline methods (no symbol dependency). The symbols are intentionally not restored: an exported std::string_view symbol's presence depends on whether the library was compiled as C++17, which is the mismatch #1661 fixed. --- CMakeLists.txt | 2 +- meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d8e6d4cfa..5d977b71c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,7 +61,7 @@ project(jsoncpp LANGUAGES CXX) message(STATUS "JsonCpp Version: ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") -set(PROJECT_SOVERSION 27) +set(PROJECT_SOVERSION 28) include(${CMAKE_CURRENT_SOURCE_DIR}/include/PreventInSourceBuilds.cmake) include(${CMAKE_CURRENT_SOURCE_DIR}/include/PreventInBuildInstalls.cmake) diff --git a/meson.build b/meson.build index 380b7e2bd..858675d9e 100644 --- a/meson.build +++ b/meson.build @@ -51,7 +51,7 @@ jsoncpp_lib = library( 'src/lib_json/json_value.cpp', 'src/lib_json/json_writer.cpp', ]), - soversion : 27, + soversion : 28, install : true, include_directories : jsoncpp_include_directories, cpp_args: dll_export_flag) From b5ab350ff38ed25fa5b6e0dc30820f2215cad345 Mon Sep 17 00:00:00 2001 From: Jordan Bayles Date: Wed, 24 Jun 2026 15:53:51 -0700 Subject: [PATCH 20/27] Add GitHub Actions workflow for Zizmor security analysis (#1699) --- .github/workflows/zizmor.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/zizmor.yml diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml new file mode 100644 index 000000000..b0f811f76 --- /dev/null +++ b/.github/workflows/zizmor.yml @@ -0,0 +1,26 @@ +name: GitHub Actions Security Analysis (zizmor) + +on: + push: + branches: ["main"] + pull_request: + branches: ["**"] + +permissions: {} + +jobs: + zizmor: + name: Run zizmor + runs-on: ubuntu-latest + permissions: + security-events: write # Required for upload-sarif (used by zizmor-action) to upload SARIF files. + contents: read # Only needed for private repos. Needed to clone the repo. + actions: read # Only needed for private repos. Needed for upload-sarif to read workflow run info. + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Run zizmor + uses: zizmorcore/zizmor-action@5f14fd08f7cf1cb1609c1e344975f152c7ee938d # v0.5.6 From affc5009c36da4ac11accf49e08586537952f451 Mon Sep 17 00:00:00 2001 From: SABITHSAHEB Date: Thu, 2 Jul 2026 04:49:51 +0530 Subject: [PATCH 21/27] honor length in valueToQuotedString fast path (#1701) --- src/lib_json/json_writer.cpp | 2 +- src/test_lib_json/main.cpp | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp index ac14eb11f..72799445d 100644 --- a/src/lib_json/json_writer.cpp +++ b/src/lib_json/json_writer.cpp @@ -216,7 +216,7 @@ static String valueToQuotedStringN(const char* value, size_t length, return ""; if (!doesAnyCharRequireEscaping(value, length)) - return String("\"") + value + "\""; + return String("\"") + String(value, length) + "\""; // We have to walk value and escape any special characters. // Appending to String is not efficient, but this should be rare. // (Note: forward slashes are *not* rare, but I am not escaping them.) diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp index 90025b443..1c0377dee 100644 --- a/src/test_lib_json/main.cpp +++ b/src/test_lib_json/main.cpp @@ -2850,6 +2850,16 @@ JSONTEST_FIXTURE_LOCAL(StreamWriterTest, writeZeroes) { } } +// valueToQuotedString(value, length) must quote exactly `length` bytes and not +// walk off the end of a buffer that is not NUL-terminated at that length. +JSONTEST_FIXTURE_LOCAL(StreamWriterTest, quotedStringHonorsLength) { + // Bytes past position 5 must not leak into the output. Without honoring + // length the buffer is treated as a C-string and " world" is appended. + JSONTEST_ASSERT_STRING_EQUAL("\"hello\"", + Json::valueToQuotedString("hello world", 5)); + JSONTEST_ASSERT_STRING_EQUAL("\"\"", Json::valueToQuotedString("abc", 0)); +} + JSONTEST_FIXTURE_LOCAL(StreamWriterTest, unicode) { // Create a Json value containing UTF-8 string with some chars that need // escape (tab,newline). From edc01ab10f52135ec80e3589b6b4e0a9c65b27fd Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Thu, 2 Jul 2026 01:26:29 +0200 Subject: [PATCH 22/27] test: make ValueTest/objects float check robust against x87 excess precision (#1700) ValueTest/objects stores the float literal 0.12345f into a Json::Value (widened to the stored double) and then asserts equality against the original 0.12345f. On 32-bit x86 targets where GCC defaults to x87 math (-mfpmath=387, 80-bit excess precision) and the baseline lacks SSE2, the round-trip yields the exact double 0.12345 rather than the float-widened 0.12345000356435776, so the exact double comparison fails even though the library itself is correct. Compare the stored value narrowed back to float via asFloat(): both the expected literal and asFloat() collapse to the same float value on every architecture, keeping the numeric round-trip check while making it precision-robust. Co-authored-by: Jordan Bayles --- src/test_lib_json/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp index 1c0377dee..0d1c33064 100644 --- a/src/test_lib_json/main.cpp +++ b/src/test_lib_json/main.cpp @@ -352,7 +352,7 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, objects) { const Json::Value* numericFound = object2_.findNumeric("numeric"); JSONTEST_ASSERT(numericFound != nullptr); - JSONTEST_ASSERT_EQUAL(0.12345f, *numericFound); + JSONTEST_ASSERT_EQUAL(0.12345f, numericFound->asFloat()); JSONTEST_ASSERT(object3_.findNumeric("numeric") == nullptr); const Json::Value* stringFound = object2_.findString("string"); From 07b067e699e229eac5735def3a9f913d92b6982c Mon Sep 17 00:00:00 2001 From: Jordan Bayles Date: Tue, 28 Jul 2026 16:25:49 -0700 Subject: [PATCH 23/27] ci(meson): switch coverage upload to official coverallsapp action (#1708) * ci(meson): switch coverage upload to official coverallsapp action Fixes the meson coverage job failure caused by an HTTP 400 response from Coveralls due to invalid service_name formatting in gcovr-action. Switches the workflow to generate a local coveralls.json file with gcovr-action and submit it using the official coverallsapp/github-action@v2. * ci(meson): pin coverallsapp/github-action to commit SHA --- .github/workflows/meson.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index cacfc2163..2860c9d57 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -68,5 +68,9 @@ jobs: - name: generate code coverage report uses: threeal/gcovr-action@v1.0.0 with: - coveralls-send: true - github-token: ${{ secrets.GITHUB_TOKEN }} + coveralls-out: coveralls.json + + - name: upload code coverage to Coveralls + uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329 # v2.3.8 + with: + file: coveralls.json From 60de77f915ab08499032d6e5a63e05e974f85d01 Mon Sep 17 00:00:00 2001 From: Kobi Hikri Date: Wed, 29 Jul 2026 03:42:11 +0300 Subject: [PATCH 24/27] ci(zizmor): trigger on push to master, not the non-existent main (#1707) The default branch is master; there is no main branch, so the push-triggered zizmor scan never runs on the default branch (only PRs are covered). Point it at master so the push scan and code-scanning baseline actually populate. Co-authored-by: Jordan Bayles --- .github/workflows/zizmor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml index b0f811f76..eebbaa263 100644 --- a/.github/workflows/zizmor.yml +++ b/.github/workflows/zizmor.yml @@ -2,7 +2,7 @@ name: GitHub Actions Security Analysis (zizmor) on: push: - branches: ["main"] + branches: ["master"] pull_request: branches: ["**"] From 85b88e9c89e26fd276621c637ea7adb6072a17db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1roly=20Szab=C3=B3?= Date: Fri, 21 Aug 2026 01:17:02 +0300 Subject: [PATCH 25/27] report an error instead of abort() while parsing an input strings with too deep nested objects/arrays when JSON_USE_EXCEPTION=0 (#1710) --- src/lib_json/json_reader.cpp | 15 ++++++++++++--- src/test_lib_json/main.cpp | 36 +++++++++++++++++++++++++++++++++--- 2 files changed, 45 insertions(+), 6 deletions(-) diff --git a/src/lib_json/json_reader.cpp b/src/lib_json/json_reader.cpp index 164d41d6f..2f901f510 100644 --- a/src/lib_json/json_reader.cpp +++ b/src/lib_json/json_reader.cpp @@ -1048,10 +1048,19 @@ bool OurReader::parse(const char* beginDoc, const char* endDoc, Value& root, } bool OurReader::readValue() { - // To preserve the old behaviour we cast size_t to int. - if (nodes_.size() > features_.stackLimit_) - throwRuntimeError("Exceeded stackLimit in readValue()."); Token token; + if (nodes_.size() > features_.stackLimit_) { +#if JSON_USE_EXCEPTION + throwRuntimeError("Exceeded stackLimit in readValue()."); +#else + // throwRuntimeError aborts. Don't abort here. + token.start_ = current_; + token.end_ = current_; + token.type_ = tokenError; + return addError( + "Exceeded stackLimit for nested object and/or array values.", token); +#endif + } readTokenSkippingComments(token); bool successful = true; diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp index 0d1c33064..2e106bc5c 100644 --- a/src/test_lib_json/main.cpp +++ b/src/test_lib_json/main.cpp @@ -467,6 +467,7 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, arrays) { JSONTEST_ASSERT_EQUAL(Json::Value(17), got); JSONTEST_ASSERT_EQUAL(false, array1_.removeIndex(2, &got)); // gone now } + JSONTEST_FIXTURE_LOCAL(ValueTest, resizeArray) { Json::Value array; { @@ -3550,10 +3551,10 @@ JSONTEST_FIXTURE_LOCAL(CharReaderTest, parseWithDetailError) { } JSONTEST_FIXTURE_LOCAL(CharReaderTest, parseWithStackLimit) { -#if JSON_USE_EXCEPTION - Json::CharReaderBuilder b; Json::Value root; + +#if JSON_USE_EXCEPTION char const doc[] = R"({ "property" : "value" })"; { b.settings_["stackLimit"] = 2; @@ -3581,7 +3582,36 @@ JSONTEST_FIXTURE_LOCAL(CharReaderTest, parseWithStackLimit) { JSONTEST_ASSERT_THROWS(reader->parse( nested.data(), nested.data() + nested.size(), &root, &errs)); } - +#else + b.settings_["stackLimit"] = 10; + CharReaderPtr reader(b.newCharReader()); + { + Json::String nested(16, '['); + Json::String errs; + JSONTEST_ASSERT(!reader->parse(nested.data(), nested.data() + nested.size(), + &root, &errs)); + JSONTEST_ASSERT( + errs == + "* Line 1, Column 11\n" + " Exceeded stackLimit for nested object and/or array values.\n"); + } + { + // even if there are mixed object/array nestings + char const mixedNested[] = R"({"property":[[[[[[[[[[[]]]]]]]]]]]})"; + Json::String errs; + JSONTEST_ASSERT(!reader->parse( + mixedNested, mixedNested + std::strlen(mixedNested), &root, &errs)); + JSONTEST_ASSERT( + errs == + "* Line 1, Column 22\n" + " Exceeded stackLimit for nested object and/or array values.\n"); + } + { // should succeed: test on the limit + Json::String onLimit = Json::String(10, '[') + Json::String(10, ']'); + Json::String errs; + JSONTEST_ASSERT(reader->parse( + onLimit.data(), onLimit.data() + onLimit.size(), &root, &errs)); + } #endif // JSON_USE_EXCEPTION } From c6f68ac5038b24a027b969dc1bf681a09f138da6 Mon Sep 17 00:00:00 2001 From: Jeff Lenamon <85593689+lenamonj@users.noreply.github.com> Date: Thu, 20 Aug 2026 18:23:26 -0400 Subject: [PATCH 26/27] fix: make the JSONCPP_USE_SECURE_MEMORY build compile and pass (#1709) Building with JSONCPP_USE_SECURE_MEMORY=1 fails in three separate ways, each hidden behind the previous one. No CI job builds this configuration, which is why they have accumulated. 1. allocator.h calls RtlSecureZeroMemory on the _WIN32 branch without including , so MSVC fails with error C3861. Removing that branch lets the portable volatile std::fill_n path handle Windows. The same fill was zeroing n bytes rather than n * sizeof(T), so for any T wider than a char, most of the allocation was never wiped. 2. jsontestrunner declares a std::string where the surrounding code uses Json::String. The two are the same type only in default builds, so the test runner does not compile under secure memory. 3. CZString's move-assignment released a key with releasePrefixedStringValue, but CZString keys come from duplicateStringValue and carry no length prefix. The destructor already uses the matching releaseStringValue. Under the default allocator this mismatch is survivable; under SecureAllocator the suite segfaults. Verified on MSVC 19.44, x64, C++17. Before: error C3861. With only the first two fixed: builds, then jsoncpp_test SEGFAULT. With all three: secure build compiles and 3/3 ctest suites pass. The default build is unaffected and also 3/3. Fixes #1399 Co-authored-by: Jordan Bayles --- include/json/allocator.h | 5 ++-- src/jsontestrunner/main.cpp | 2 +- src/lib_json/json_value.cpp | 4 ++- src/test_lib_json/main.cpp | 52 ++++++++++++++++++------------------- 4 files changed, 32 insertions(+), 31 deletions(-) diff --git a/include/json/allocator.h b/include/json/allocator.h index 459c34c61..fa79d97f4 100644 --- a/include/json/allocator.h +++ b/include/json/allocator.h @@ -43,10 +43,9 @@ template class SecureAllocator { // unlike memset. #if defined(HAVE_MEMSET_S) memset_s(p, n * sizeof(T), 0, n * sizeof(T)); -#elif defined(_WIN32) - RtlSecureZeroMemory(p, n * sizeof(T)); #else - std::fill_n(reinterpret_cast(p), n, 0); + std::fill_n(reinterpret_cast(p), n * sizeof(T), + static_cast(0)); #endif // free using "global operator delete" diff --git a/src/jsontestrunner/main.cpp b/src/jsontestrunner/main.cpp index ab6a80039..e499276dc 100644 --- a/src/jsontestrunner/main.cpp +++ b/src/jsontestrunner/main.cpp @@ -328,7 +328,7 @@ int main(int argc, const char* argv[]) { return modern_return_code; } - const std::string filename = + const Json::String filename = opts.path.substr(opts.path.find_last_of("\\/") + 1); const bool should_run_legacy = (filename.rfind("legacy_", 0) == 0); if (should_run_legacy) { diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp index 5823bd1d9..6b14c2deb 100644 --- a/src/lib_json/json_value.cpp +++ b/src/lib_json/json_value.cpp @@ -324,7 +324,9 @@ Value::CZString& Value::CZString::operator=(const CZString& other) { Value::CZString& Value::CZString::operator=(CZString&& other) noexcept { if (cstr_ && storage_.policy_ == duplicate) { - releasePrefixedStringValue(const_cast(cstr_)); + // CZString keys come from duplicateStringValue (no length prefix), so + // release with the matching non-prefixed variant, as the destructor does. + releaseStringValue(const_cast(cstr_), storage_.length_ + 1U); } cstr_ = other.cstr_; if (other.cstr_) { diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp index 2e106bc5c..e09b87b84 100644 --- a/src/test_lib_json/main.cpp +++ b/src/test_lib_json/main.cpp @@ -214,8 +214,8 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, CZStringCoverage) { runCZStringTests(); } JSONTEST_FIXTURE_LOCAL(ValueTest, checkNormalizeFloatingPointStr) { struct TestData { - std::string in; - std::string out; + Json::String in; + Json::String out; } const testData[] = { {"0.0", "0.0"}, {"0e0", "0e0"}, @@ -295,7 +295,7 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, objects) { JSONTEST_ASSERT(foundId != nullptr); JSONTEST_ASSERT_EQUAL(Json::Value(1234), *foundId); - const std::string stringIdKey = "id"; + const Json::String stringIdKey = "id"; const Json::Value* stringFoundId = object1_.find(stringIdKey); JSONTEST_ASSERT(stringFoundId != nullptr); JSONTEST_ASSERT_EQUAL(Json::Value(1234), *stringFoundId); @@ -305,7 +305,7 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, objects) { object1_.find(unknownIdKey, unknownIdKey + strlen(unknownIdKey)); JSONTEST_ASSERT_EQUAL(nullptr, foundUnknownId); - const std::string stringUnknownIdKey = "unknown id"; + const Json::String stringUnknownIdKey = "unknown id"; const Json::Value* stringFoundUnknownId = object1_.find(stringUnknownIdKey); JSONTEST_ASSERT_EQUAL(nullptr, stringFoundUnknownId); @@ -357,7 +357,7 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, objects) { const Json::Value* stringFound = object2_.findString("string"); JSONTEST_ASSERT(stringFound != nullptr); - JSONTEST_ASSERT_EQUAL(std::string{"string"}, *stringFound); + JSONTEST_ASSERT_EQUAL(Json::String{"string"}, *stringFound); JSONTEST_ASSERT(object3_.findString("string") == nullptr); const Json::Value* arrayFound = object2_.findArray("array"); @@ -2028,9 +2028,9 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, StaticString) { JSONTEST_FIXTURE_LOCAL(ValueTest, WideString) { // https://github.com/open-source-parsers/jsoncpp/issues/756 - const std::string uni = + const Json::String uni = reinterpret_cast(u8"\u5f0f\uff0c\u8fdb"); // "式,进" - std::string styled; + Json::String styled; { Json::Value v; v["abc"] = uni; @@ -2039,7 +2039,7 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, WideString) { Json::Value root; { JSONCPP_STRING errs; - std::istringstream iss(styled); + Json::IStringStream iss(styled); bool ok = parseFromStream(Json::CharReaderBuilder(), iss, &root, &errs); JSONTEST_ASSERT(ok); if (!ok) { @@ -2894,7 +2894,7 @@ JSONTEST_FIXTURE_LOCAL(StreamWriterTest, unicode) { JSONTEST_FIXTURE_LOCAL(StreamWriterTest, escapeControlCharacters) { auto uEscape = [](unsigned ch) { static const char h[] = "0123456789abcdef"; - std::string r = "\\u"; + Json::String r = "\\u"; r += h[(ch >> (3 * 4)) & 0xf]; r += h[(ch >> (2 * 4)) & 0xf]; r += h[(ch >> (1 * 4)) & 0xf]; @@ -2931,8 +2931,8 @@ JSONTEST_FIXTURE_LOCAL(StreamWriterTest, escapeControlCharacters) { if (!emitUTF8 && i >= 0x80) break; // The algorithm would try to parse UTF-8, so stop here. - std::string raw({static_cast(i)}); - std::string esc = raw; + Json::String raw({static_cast(i)}); + Json::String esc = raw; if (i < 0x20) esc = uEscape(i); if (const char* shEsc = shortEscape(i)) @@ -2944,7 +2944,7 @@ JSONTEST_FIXTURE_LOCAL(StreamWriterTest, escapeControlCharacters) { Json::Value root; root["test"] = raw; JSONTEST_ASSERT_STRING_EQUAL( - std::string("{\n\t\"test\" : \"").append(esc).append("\"\n}"), + Json::String("{\n\t\"test\" : \"").append(esc).append("\"\n}"), Json::writeString(b, root)) << ", emit=" << emitUTF8 << ", i=" << i << ", raw=\"" << raw << "\"" << ", esc=\"" << esc << "\""; @@ -3018,7 +3018,7 @@ struct ReaderTest : JsonTest::TestCase { template void checkParse(Input&& input, const std::vector& structured, - const std::string& formatted) { + const Json::String& formatted) { checkParse(input, structured); JSONTEST_ASSERT_EQUAL(formatted, reader->getFormattedErrorMessages()); } @@ -3793,7 +3793,7 @@ struct CharReaderAllowDropNullTest : JsonTest::TestCase { return [=](const Value& root) { JSONTEST_ASSERT_EQUAL(root, v); }; } - static ValueCheck objGetAnd(std::string idx, ValueCheck f) { + static ValueCheck objGetAnd(Json::String idx, ValueCheck f) { return [=](const Value& root) { f(root.get(idx, true)); }; } @@ -4117,16 +4117,16 @@ JSONTEST_FIXTURE_LOCAL(IteratorTest, members) { j["k1"] = "a"; j["k2"] = "b"; - std::vector keys; - std::vector values; + std::vector keys; + std::vector values; for (const auto& member : j.members()) { keys.push_back(member.name); values.push_back(member.value.asString()); } - JSONTEST_ASSERT((keys == std::vector{"k1", "k2"})); - JSONTEST_ASSERT((values == std::vector{"a", "b"})); + JSONTEST_ASSERT((keys == std::vector{"k1", "k2"})); + JSONTEST_ASSERT((values == std::vector{"a", "b"})); // Test modification through value reference for (const auto& member : j.members()) { @@ -4145,8 +4145,8 @@ JSONTEST_FIXTURE_LOCAL(IteratorTest, members) { values.push_back(member.value.asString()); } - JSONTEST_ASSERT((keys == std::vector{"k1", "k2"})); - JSONTEST_ASSERT((values == std::vector{"c", "c"})); + JSONTEST_ASSERT((keys == std::vector{"k1", "k2"})); + JSONTEST_ASSERT((values == std::vector{"c", "c"})); #if __cplusplus >= 201703L keys.clear(); @@ -4155,8 +4155,8 @@ JSONTEST_FIXTURE_LOCAL(IteratorTest, members) { keys.push_back(k); values.push_back(v.asString()); } - JSONTEST_ASSERT((keys == std::vector{"k1", "k2"})); - JSONTEST_ASSERT((values == std::vector{"c", "c"})); + JSONTEST_ASSERT((keys == std::vector{"k1", "k2"})); + JSONTEST_ASSERT((values == std::vector{"c", "c"})); #endif } @@ -4173,25 +4173,25 @@ JSONTEST_FIXTURE_LOCAL(IteratorTest, decrement) { Json::Value json; json["k1"] = "a"; json["k2"] = "b"; - std::vector values; + std::vector values; for (auto it = json.end(); it != json.begin();) { --it; values.push_back(it->asString()); } - JSONTEST_ASSERT((values == std::vector{"b", "a"})); + JSONTEST_ASSERT((values == std::vector{"b", "a"})); } JSONTEST_FIXTURE_LOCAL(IteratorTest, reverseIterator) { Json::Value json; json["k1"] = "a"; json["k2"] = "b"; - std::vector values; + std::vector values; using Iter = decltype(json.begin()); auto re = std::reverse_iterator(json.begin()); for (auto it = std::reverse_iterator(json.end()); it != re; ++it) { values.push_back(it->asString()); } - JSONTEST_ASSERT((values == std::vector{"b", "a"})); + JSONTEST_ASSERT((values == std::vector{"b", "a"})); } JSONTEST_FIXTURE_LOCAL(IteratorTest, distance) { From 3347a4b86bb914cb565f0cbda19c06e109513300 Mon Sep 17 00:00:00 2001 From: Jordan Bayles Date: Thu, 20 Aug 2026 15:44:45 -0700 Subject: [PATCH 27/27] docs: modernize doxygen build and publish from this repository (#1711) * docs: modernize doxygen build and publish from this repository The API docs were last published to the separate jsoncpp-docs repo in January 2021 (for 1.9.4) and the local doxygen build has been broken since the versioning rework removed the top-level `version` file. Build fixes: - doxybuild.py reads the version from include/json/version.h instead of a `version` file that CMake only generates in the build directory. - doc/doxyfile.in is reduced to the non-default settings (the 2013-era 1.8.5 template triggered 17 obsolete-tag warnings on current doxygen) and now sets WARN_AS_ERROR so documentation regressions fail the build. - JSONCPP_DEPRECATED/JSON_API are stripped during preprocessing and __cplusplus=201703L is predefined, so deprecated members and the std::string_view overloads are documented. Documentation fixes: - reader.h / writer.h: a mismatched 'settings_` quote opened a backtick span that swallowed the rest of each header, leaving CharReaderBuilder and StreamWriterBuilder effectively undocumented. - value.h: document the remaining parameters of Value::get and Value::removeMember. - json_value.cpp: hide the private Value::CZString implementation from doxygen with \cond. Output: - Style with doxygen-awesome-css v2.4.2 (vendored, MIT) in place of the 1.8.13-era header/footer templates; enable tree view and search. - Use README.md as the main page; jsoncpp.dox becomes a "Quick start" page with the dead SourceForge links removed. Drop the 3-line roadmap stub and the redundant web_doxyfile.in. Publishing: - New docs workflow builds on pull requests (as a warning check) and deploys to GitHub Pages on pushes to master with a pinned, checksum-verified doxygen 1.18.0. README links now point at https://open-source-parsers.github.io/jsoncpp/. Co-Authored-By: Claude Fable 5 * docs: pin workflow actions, drop fragile caller graphs zizmor requires actions pinned to commit SHAs and persist-credentials off. The caller graph for Json::Value::Value exceeded doxygen's node limit in CI, which WARN_AS_ERROR turned into a failure; caller graphs of the implementation add little to API docs, so drop them and leave headroom in DOT_GRAPH_MAX_NODES for the remaining graphs. Co-Authored-By: Claude Fable 5 * docs: restrict Pages deploy to master, fix --tarball sources workflow_dispatch from a non-master branch could previously publish that branch's docs over the production site. The tarball list also still referenced NEWS.txt and version, neither of which exists in the tree. Co-Authored-By: Claude Fable 5 --------- Co-authored-by: Claude Fable 5 --- .github/workflows/docs.yml | 73 + README.md | 8 +- doc/doxyfile.in | 2325 +------------ doc/doxygen-awesome-css/LICENSE | 21 + .../doxygen-awesome-sidebar-only.css | 105 + doc/doxygen-awesome-css/doxygen-awesome.css | 3054 +++++++++++++++++ doc/footer.html | 21 - doc/header.html | 64 - doc/jsoncpp.dox | 50 +- doc/readme.txt | 11 +- doc/roadmap.dox | 3 - doc/web_doxyfile.in | 2290 ------------ doxybuild.py | 35 +- include/json/reader.h | 2 +- include/json/value.h | 2 + include/json/writer.h | 4 +- src/lib_json/json_value.cpp | 4 + 17 files changed, 3377 insertions(+), 4695 deletions(-) create mode 100644 .github/workflows/docs.yml create mode 100644 doc/doxygen-awesome-css/LICENSE create mode 100644 doc/doxygen-awesome-css/doxygen-awesome-sidebar-only.css create mode 100644 doc/doxygen-awesome-css/doxygen-awesome.css delete mode 100644 doc/footer.html delete mode 100644 doc/header.html delete mode 100644 doc/roadmap.dox delete mode 100644 doc/web_doxyfile.in diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..d1b003617 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,73 @@ +name: docs + +on: + push: + branches: [master] + pull_request: + workflow_dispatch: + +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + DOXYGEN_VERSION: 1.18.0 + DOXYGEN_SHA256: 14fa81bdc34171edb5f1f02b1d60e74802f0439b77fa44e592565d517d72df90 + +permissions: + contents: read + +# One docs build per branch; superseded PR pushes are cancelled. The deploy job +# has its own non-cancelling "pages" group so an in-flight deployment finishes. +concurrency: + group: docs-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 + with: + persist-credentials: false + + - name: install doxygen ${{ env.DOXYGEN_VERSION }} and graphviz + run: | + set -euo pipefail + tag="Release_${DOXYGEN_VERSION//./_}" + curl -fsSL -o doxygen.tar.gz \ + "https://github.com/doxygen/doxygen/releases/download/${tag}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz" + echo "${DOXYGEN_SHA256} doxygen.tar.gz" | sha256sum --check + sudo tar -xzf doxygen.tar.gz -C /opt + echo "/opt/doxygen-${DOXYGEN_VERSION}/bin" >> "$GITHUB_PATH" + sudo apt-get update -q + sudo apt-get install -y -q graphviz + + # doxygen runs with WARN_AS_ERROR, so any documentation warning fails here. + - name: generate documentation + run: | + doxygen --version + python3 doxybuild.py --with-dot + mv dist/doxygen/jsoncpp-api-html-* site + + - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 + with: + path: site + + deploy: + name: deploy to GitHub Pages + # Only master may publish; a workflow_dispatch from any other branch just + # builds as a check and must not replace the production documentation. + if: github.ref == 'refs/heads/master' + needs: build + runs-on: ubuntu-latest + permissions: + pages: write # to publish the Pages deployment + id-token: write # to verify the deployment originates from this workflow + concurrency: + group: pages + cancel-in-progress: false + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 diff --git a/README.md b/README.md index 2cbf00b30..4434f98f4 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Conan Center](https://img.shields.io/conan/v/jsoncpp)](https://conan.io/center/recipes/jsoncpp) [![badge](https://img.shields.io/badge/license-MIT-blue)](https://github.com/open-source-parsers/jsoncpp/blob/master/LICENSE) -[![badge](https://img.shields.io/badge/document-doxygen-brightgreen)](http://open-source-parsers.github.io/jsoncpp-docs/doxygen/index.html) +[![badge](https://img.shields.io/badge/document-doxygen-brightgreen)](https://open-source-parsers.github.io/jsoncpp/) [![Coverage Status](https://coveralls.io/repos/github/open-source-parsers/jsoncpp/badge.svg?branch=master)](https://coveralls.io/github/open-source-parsers/jsoncpp?branch=master) [JSON][json-org] is a lightweight data-interchange format. It can represent @@ -72,10 +72,12 @@ This will generate a `dist` directory containing `jsoncpp.cpp`, `json/json.h`, a ## Documentation -Documentation is generated via [Doxygen](http://open-source-parsers.github.io/jsoncpp-docs/doxygen/index.html). +The [API reference](https://open-source-parsers.github.io/jsoncpp/) is generated with +Doxygen from the `master` branch on every push. To build it locally, run +`python3 doxybuild.py --open` from the top-level directory (see `doc/readme.txt`). Additional information is available on the [Project Wiki](https://github.com/open-source-parsers/jsoncpp/wiki). ## License JsonCpp is licensed under the MIT license, or public domain where recognized. -See [LICENSE](./LICENSE) for details. +See [LICENSE](https://github.com/open-source-parsers/jsoncpp/blob/master/LICENSE) for details. diff --git a/doc/doxyfile.in b/doc/doxyfile.in index dcf514ea3..de3d97428 100644 --- a/doc/doxyfile.in +++ b/doc/doxyfile.in @@ -1,2302 +1,105 @@ -# Doxyfile 1.8.5 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. +# Doxygen configuration template for JsonCpp. +# +# Only settings that differ from the doxygen defaults are listed. Tokens of the +# form %NAME% are substituted by doxybuild.py, which is the supported way to +# build the documentation: # -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. +# python3 doxybuild.py [--with-dot] [--open] # -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). +# Run `doxygen -x doc/doxyfile` (after doxybuild.py has generated it) to see the +# effective configuration, or `doxygen -g` for a fully-commented reference. #--------------------------------------------------------------------------- -# Project related configuration options +# Project #--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = "JsonCpp" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - +PROJECT_NAME = JsonCpp PROJECT_NUMBER = %JSONCPP_VERSION% - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = %DOC_TOPDIR% - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese- -# Traditional, Croatian, Czech, Danish, Dutch, English, Esperanto, Farsi, -# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en, -# Korean, Korean-en, Latvian, Norwegian, Macedonian, Persian, Polish, -# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, -# Turkish, Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - +PROJECT_BRIEF = "JSON data format manipulation library" STRIP_FROM_PATH = %TOPDIR% - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - STRIP_FROM_INC_PATH = %TOPDIR%/include - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - JAVADOC_AUTOBRIEF = YES - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 3 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. - -ALIASES = "testCaseSetup=\link CppUT::TestCase::setUp() setUp()\endlink" \ - "testCaseRun=\link CppUT::TestCase::run() run()\endlink" \ - "testCaseTearDown=\link CppUT::TestCase::tearDown() tearDown()\endlink" \ - "json_ref=JSON (JavaScript Object Notation)" - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make -# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C -# (default is Fortran), use: inc=Fortran f=C. -# -# Note For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - +TAB_SIZE = 2 BUILTIN_STL_SUPPORT = YES - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 +TIMESTAMP = NO #--------------------------------------------------------------------------- -# Build related configuration options +# Input #--------------------------------------------------------------------------- +INPUT = ../include \ + ../src/lib_json \ + ../README.md \ + . +FILE_PATTERNS = *.h \ + *.cpp \ + *.inl \ + *.dox \ + *.md +RECURSIVE = YES +USE_MDFILE_AS_MAINPAGE = ../README.md +EXAMPLE_PATH = .. -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - +#--------------------------------------------------------------------------- +# Extraction +#--------------------------------------------------------------------------- EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be -# included in the documentation. -# The default value is: NO. - EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - EXTRACT_LOCAL_CLASSES = NO - -# This flag is only useful for Objective-C code. When set to YES local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be -# included in the documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - INTERNAL_DOCS = YES - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - SORT_BY_SCOPE_NAME = YES - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. -# The default value is: YES. - GENERATE_TESTLIST = NO - -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - GENERATE_BUGLIST = NO -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. Do not use file names with spaces, bibtex cannot handle them. See -# also \cite for info how to create references. - -CITE_BIB_FILES = - #--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages +# Warnings: the build fails on any documentation warning so regressions are +# caught in CI. See .github/workflows/docs.yml. #--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - +WARN_AS_ERROR = FAIL_ON_WARNINGS WARN_LOGFILE = %WARNING_LOG_PATH% #--------------------------------------------------------------------------- -# Configuration options related to the input files +# Preprocessing: document the public API as seen by a modern C++17 compiler, +# with export/deprecation decorations stripped. #--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. -# Note: If this tag is empty the current directory is searched. - -INPUT = ../include \ - ../src/lib_json \ - . - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank the -# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, -# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, -# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. - -FILE_PATTERNS = *.h \ - *.cpp \ - *.inl \ - *.dox - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = .. - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = * - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = +MACRO_EXPANSION = YES +INCLUDE_PATH = ../include +INCLUDE_FILE_PATTERNS = *.h +PREDEFINED = JSONCPP_DOC_EXCLUDE_IMPLEMENTATION \ + "JSONCPP_DEPRECATED(message)=" \ + "JSON_API=" \ + "JSONCPP_NORETURN=" \ + "__cplusplus=201703L" \ + "JSON_USE_EXCEPTION=1" #--------------------------------------------------------------------------- -# Configuration options related to source browsing +# HTML output, styled with doxygen-awesome-css (doc/doxygen-awesome-css/). +# The colour-style settings are the ones recommended by that theme. #--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - +HTML_OUTPUT = %HTML_OUTPUT% +HTML_EXTRA_STYLESHEET = doxygen-awesome-css/doxygen-awesome.css \ + doxygen-awesome-css/doxygen-awesome-sidebar-only.css +HTML_COLORSTYLE = LIGHT +HTML_COLORSTYLE_HUE = 209 +HTML_COLORSTYLE_SAT = 255 +HTML_COLORSTYLE_GAMMA = 113 +HTML_DYNAMIC_SECTIONS = YES +GENERATE_TREEVIEW = YES +DISABLE_INDEX = NO +FULL_SIDEBAR = NO +SEARCHENGINE = YES SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES -TOC_INCLUDE_HEADINGS = 2 - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = %HTML_OUTPUT% - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = header.html - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = footer.html - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- -# defined cascading style sheet that is included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet file to the output directory. For an example -# see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = YES - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = %HTML_HELP% - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = jsoncpp-%JSONCPP_VERSION%.chm - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = "c:\Program Files\HTML Help Workshop\hhc.exe" - -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = YES - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = YES - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = YES - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side JavaScript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /