Skip to content

Commit

Permalink
Merge branch 'release/3.10.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Oct 8, 2021
2 parents 626e7d6 + ab6a2c7 commit aa0e847
Show file tree
Hide file tree
Showing 94 changed files with 633 additions and 295 deletions.
3 changes: 3 additions & 0 deletions .clang-tidy
@@ -1,5 +1,7 @@
Checks: '*,
-altera-struct-pack-align,
-android-cloexec-fopen,
-concurrency-mt-unsafe,
-cppcoreguidelines-avoid-goto,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-avoid-non-const-global-variables,
Expand Down Expand Up @@ -30,6 +32,7 @@ Checks: '*,
-misc-non-private-member-variables-in-classes,
-modernize-use-trailing-return-type,
-readability-function-size,
-readability-function-cognitive-complexity,
-readability-magic-numbers,
-readability-redundant-access-specifiers,
-readability-uppercase-literal-suffix'
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Bug_report.md
Expand Up @@ -47,7 +47,7 @@ assignees: ''

<!-- Please add an `x` to the respective line. -->

- [ ] latest release version 3.10.2
- [ ] latest release version 3.10.3
- [ ] other release - please state the version: ___
- [ ] the `develop` branch

Expand Down
27 changes: 8 additions & 19 deletions .github/workflows/ubuntu.yml
Expand Up @@ -11,28 +11,17 @@ on:
jobs:
ci_test_clang:
runs-on: ubuntu-latest
container: ghcr.io/nlohmann/json-ci:v1.0.0
steps:
- uses: actions/checkout@v2
- name: install_ninja
run: |
sudo apt update
sudo apt install ninja-build
shell: bash
- name: install_clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 11
sudo apt-get install clang-tools-11
shell: bash
- name: cmake
run: cmake -S . -B build -DJSON_CI=On
- name: build
run: cmake --build build --target ci_test_clang

ci_test_gcc:
runs-on: ubuntu-latest
container: nlohmann/json-ci:latest
container: ghcr.io/nlohmann/json-ci:v1.0.0
steps:
- uses: actions/checkout@v2
- name: cmake
Expand All @@ -42,7 +31,7 @@ jobs:

ci_static_analysis:
runs-on: ubuntu-latest
container: nlohmann/json-ci:latest
container: ghcr.io/nlohmann/json-ci:v1.0.0
strategy:
matrix:
target: [ci_clang_tidy, ci_cppcheck, ci_test_valgrind, ci_test_clang_sanitizer, ci_test_amalgamation, ci_clang_analyze, ci_cpplint, ci_cmake_flags, ci_single_binaries, ci_reproducible_tests, ci_non_git_tests, ci_offline_testdata, ci_infer]
Expand All @@ -55,7 +44,7 @@ jobs:

ci_cmake_options:
runs-on: ubuntu-latest
container: nlohmann/json-ci:latest
container: ghcr.io/nlohmann/json-ci:v1.0.0
strategy:
matrix:
target: [ci_test_diagnostics, ci_test_noexceptions, ci_test_noimplicitconversions]
Expand All @@ -68,7 +57,7 @@ jobs:

ci_test_coverage:
runs-on: ubuntu-latest
container: nlohmann/json-ci:latest
container: ghcr.io/nlohmann/json-ci:v1.0.0
steps:
- uses: actions/checkout@v2
- name: cmake
Expand All @@ -88,10 +77,10 @@ jobs:

ci_test_compilers:
runs-on: ubuntu-latest
container: nlohmann/json-ci:latest
container: ghcr.io/nlohmann/json-ci:v1.0.0
strategy:
matrix:
compiler: [g++-4.8, g++-4.9, g++-5, g++-7, g++-8, g++-9, g++-10, clang++-3.5, clang++-3.6, clang++-3.7, clang++-3.8, clang++-3.9, clang++-4.0, clang++-5.0, clang++-6.0, clang++-7, clang++-8, clang++-9, clang++-10, clang++-11]
compiler: [g++-4.8, g++-4.9, g++-5, g++-7, g++-8, g++-9, g++-10, clang++-3.5, clang++-3.6, clang++-3.7, clang++-3.8, clang++-3.9, clang++-4.0, clang++-5.0, clang++-6.0, clang++-7, clang++-8, clang++-9, clang++-10, clang++-11, clang++-12]
steps:
- uses: actions/checkout@v2
- name: cmake
Expand All @@ -101,7 +90,7 @@ jobs:

ci_test_standards:
runs-on: ubuntu-latest
container: nlohmann/json-ci:latest
container: ghcr.io/nlohmann/json-ci:v1.0.0
strategy:
matrix:
standard: [11, 14, 17, 20]
Expand Down
9 changes: 3 additions & 6 deletions .gitignore
Expand Up @@ -12,10 +12,6 @@ build
build_coverage
clang_analyze_build

doc/xml
doc/html
me.nlohmann.json.docset

benchmarks/files/numbers/*.json

.wsjcpp-logs/*
Expand All @@ -27,10 +23,11 @@ benchmarks/files/numbers/*.json
test/test-*
/.vs

doc/html
doc/mkdocs/venv/
doc/mkdocs/docs/images
doc/mkdocs/docs/examples
doc/mkdocs/site
doc/mkdocs/docs/__pycache__/
doc/xml
/doc/docset/nlohmann_json.docset/
/doc/docset/JSON_for_Modern_C++.docset/
/doc/docset/JSON_for_Modern_C++.tgz
2 changes: 1 addition & 1 deletion CITATION.cff
Expand Up @@ -7,7 +7,7 @@ authors:
email: mail@nlohmann.me
website: https://nlohmann.me
title: "JSON for Modern C++"
version: 3.10.2
version: 3.10.3
date-released: 2021
license: MIT
repository-code: "https://github.com/nlohmann"
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.1)
## PROJECT
## name and version
##
project(nlohmann_json VERSION 3.10.2 LANGUAGES CXX)
project(nlohmann_json VERSION 3.10.3 LANGUAGES CXX)

##
## MAIN_PROJECT CHECK
Expand Down
39 changes: 35 additions & 4 deletions ChangeLog.md
@@ -1,16 +1,47 @@
# Changelog
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).

## [3.10.2](https://github.com/nlohmann/json/releases/tag/3.10.2) (2021-08-26)
## [3.10.3](https://github.com/nlohmann/json/releases/tag/3.10.3) (2021-10-08)

[Full Changelog](https://github.com/nlohmann/json/compare/v3.10.2...3.10.3)

- Parsing an emtpy string returns a string with size 1 instead of expected 0 [\#3057](https://github.com/nlohmann/json/issues/3057)
- Linking error "duplicate symbol: std::type\_info::operator==" on static build with MinGW [\#3042](https://github.com/nlohmann/json/issues/3042)
- Yet another assertion failure when inserting into arrays with JSON\_DIAGNOSTICS set [\#3032](https://github.com/nlohmann/json/issues/3032)
- accept and parse function not work well with a pure number string [\#3029](https://github.com/nlohmann/json/issues/3029)
- push\_back doesn't work for serializing containers [\#3027](https://github.com/nlohmann/json/issues/3027)
- Strange behaviour when creating array with single element [\#3025](https://github.com/nlohmann/json/issues/3025)
- Input ordered\_json doesn't work [\#3023](https://github.com/nlohmann/json/issues/3023)
- Issue iterating through 'items' [\#3021](https://github.com/nlohmann/json/issues/3021)
- Cannot spell the namespace right [\#3015](https://github.com/nlohmann/json/issues/3015)
- JSON Parse error when reading json object from file [\#3011](https://github.com/nlohmann/json/issues/3011)
- Parent pointer not properly set when using update\(\) [\#3007](https://github.com/nlohmann/json/issues/3007)
- Overwriting terminated null character [\#3001](https://github.com/nlohmann/json/issues/3001)
- 'operator =' is ambiguous on VS2017 [\#2997](https://github.com/nlohmann/json/issues/2997)
- JSON Patch for Array Elements [\#2994](https://github.com/nlohmann/json/issues/2994)
- JSON Parse throwing error [\#2983](https://github.com/nlohmann/json/issues/2983)
- to\_{binary format} does not provide a mechanism for specifying a custom allocator for the returned type. [\#2982](https://github.com/nlohmann/json/issues/2982)
- 3.10.1 zip json.hpp has version number 3.10.0 instead of 3.10.1 [\#2973](https://github.com/nlohmann/json/issues/2973)
- Assertion failure when serializing array with JSON\_DIAGNOSTICS set [\#2926](https://github.com/nlohmann/json/issues/2926)

- Fix Clang version [\#3040](https://github.com/nlohmann/json/pull/3040) ([nlohmann](https://github.com/nlohmann))
- Fix assertion failure for JSON\_DIAGNOSTICS [\#3037](https://github.com/nlohmann/json/pull/3037) ([carlsmedstad](https://github.com/carlsmedstad))
- meta: fix is\_compatible/constructible traits [\#3020](https://github.com/nlohmann/json/pull/3020) ([theodelrieu](https://github.com/theodelrieu))
- Set parent pointers for values inserted via update\(\) \(fixes \#3007\). [\#3008](https://github.com/nlohmann/json/pull/3008) ([AnthonyVH](https://github.com/AnthonyVH))
- Allow allocators for output\_vector\_adapter [\#2989](https://github.com/nlohmann/json/pull/2989) ([nlohmann](https://github.com/nlohmann))
- Re-add Clang 12 [\#2986](https://github.com/nlohmann/json/pull/2986) ([nlohmann](https://github.com/nlohmann))
- Use new Docker image [\#2981](https://github.com/nlohmann/json/pull/2981) ([nlohmann](https://github.com/nlohmann))
- Fix -Wunused warnings on JSON\_DIAGNOSTICS [\#2976](https://github.com/nlohmann/json/pull/2976) ([gcerretani](https://github.com/gcerretani))
- Update docset generation script [\#2967](https://github.com/nlohmann/json/pull/2967) ([nlohmann](https://github.com/nlohmann))

## [v3.10.2](https://github.com/nlohmann/json/releases/tag/v3.10.2) (2021-08-26)

[Full Changelog](https://github.com/nlohmann/json/compare/v3.10.1...3.10.2)
[Full Changelog](https://github.com/nlohmann/json/compare/v3.10.1...v3.10.2)

- Annoying -Wundef on new JSON\_DIAGNOSTICS macro [\#2975](https://github.com/nlohmann/json/issues/2975)
- += issue with multiple redirection. [\#2970](https://github.com/nlohmann/json/issues/2970)
- "incomplete type ‘nlohmann::detail::wide\_string\_input\_helper" compilation error [\#2969](https://github.com/nlohmann/json/issues/2969)

- Fix -Wunused warnings on JSON\_DIAGNOSTICS [\#2976](https://github.com/nlohmann/json/pull/2976) ([gcerretani](https://github.com/gcerretani))

## [v3.10.1](https://github.com/nlohmann/json/releases/tag/v3.10.1) (2021-08-24)

[Full Changelog](https://github.com/nlohmann/json/compare/v3.10.0...v3.10.1)
Expand Down
16 changes: 11 additions & 5 deletions README.md
Expand Up @@ -10,7 +10,7 @@
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/e0d1a9d5d6fd46fcb655c4cb930bb3e8)](https://www.codacy.com/gh/nlohmann/json/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=nlohmann/json&amp;utm_campaign=Badge_Grade)
[![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/nlohmann/json.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/nlohmann/json/context:cpp)
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/json.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:json)
[![Try online](https://img.shields.io/badge/try-online-blue.svg)](https://wandbox.org/permlink/7p8sQckddTc0Y81T)
[![Try online](https://img.shields.io/badge/try-online-blue.svg)](https://wandbox.org/permlink/0LzTlmYG06u8qJN5)
[![Documentation](https://img.shields.io/badge/docs-doxygen-blue.svg)](https://nlohmann.github.io/json/doxygen/index.html)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/nlohmann/json/master/LICENSE.MIT)
[![GitHub Releases](https://img.shields.io/github/release/nlohmann/json.svg)](https://github.com/nlohmann/json/releases)
Expand Down Expand Up @@ -90,6 +90,7 @@ Thanks everyone!

:bug: If you found a **bug**, please check the [**FAQ**](https://json.nlohmann.me/home/faq/) if it is a known issue or the result of a design decision. Please also have a look at the [**issue list**](https://github.com/nlohmann/json/issues) before you [**create a new issue**](https://github.com/nlohmann/json/issues/new/choose). Please provide as many information as possible to help us understand and reproduce your issue.

There is also a [**docset**](https://github.com/Kapeli/Dash-User-Contributions/tree/master/docsets/JSON_for_Modern_C%2B%2B) for the documentation browsers [Dash](https://kapeli.com/dash), [Velocity](https://velocity.silverlakesoftware.com), and [Zeal](https://zealdocs.org) that contains the full [documentation](https://json.nlohmann.me) as offline resource.

## Examples

Expand Down Expand Up @@ -1038,7 +1039,7 @@ auto cbor = json::to_msgpack(j); // 0xD5 (fixext2), 0x10, 0xCA, 0xFE
Though it's 2021 already, the support for C++11 is still a bit sparse. Currently, the following compilers are known to work:
- GCC 4.8 - 11.0 (and possibly later)
- Clang 3.4 - 12.0 (and possibly later)
- Clang 3.4 - 13.0 (and possibly later)
- Apple Clang 9.1 - 12.4 (and possibly later)
- Intel C++ Compiler 17.0.2 (and possibly later)
- Microsoft Visual C++ 2015 / Build Tools 14.0.25123.0 (and possibly later)
Expand Down Expand Up @@ -1110,7 +1111,8 @@ The following compilers are currently used in continuous integration at [Travis]
| Clang 11.0.0 with GNU-like command-line | Windows-10.0.17763 | GitHub Actions |
| Clang 11.0.0 with MSVC-like command-line | Windows-10.0.17763 | GitHub Actions |
| Clang 11.0.0 (11.0.0-2~ubuntu20.04.1) | Ubuntu 20.04.2 LTS | GitHub Actions |
| Clang 12.1.0 (12.0.1-++20210423082613+072c90a863aa-1~exp1~20210423063319.76 | Ubuntu 20.04.2 LTS | GitHub Actions |
| Clang 12.0.0 (12.0.0-3ubuntu1~20.04.3) | Ubuntu 20.04.2 LTS | GitHub Actions |
| Clang 13.0.0 (13.0.0-++20210828094952+9c49fee5e7ac-1exp120210828075752.71 | Ubuntu 20.04.2 LTS | GitHub Actions |
| Visual Studio 14 2015 MSVC 19.0.24241.7 (Build Engine version 14.0.25420.1) | Windows-6.3.9600 | AppVeyor |
| Visual Studio 15 2017 MSVC 19.16.27035.0 (Build Engine version 15.9.21+g9802d43bc3 for .NET Framework) | Windows-10.0.14393 | AppVeyor |
| Visual Studio 15 2017 MSVC 19.16.27045.0 (Build Engine version 15.9.21+g9802d43bc3 for .NET Framework) | Windows-10.0.14393 | GitHub Actions |
Expand Down Expand Up @@ -1262,7 +1264,9 @@ If you are using [NuGet](https://www.nuget.org), you can use the package [nlohma

If you are using [conda](https://conda.io/), you can use the package [nlohmann_json](https://github.com/conda-forge/nlohmann_json-feedstock) from [conda-forge](https://conda-forge.org) executing `conda install -c conda-forge nlohmann_json`. Please file issues [here](https://github.com/conda-forge/nlohmann_json-feedstock/issues).

If you are using [MSYS2](https://www.msys2.org/), your can use the [mingw-w64-nlohmann-json](https://packages.msys2.org/base/mingw-w64-nlohmann-json) package, just type `pacman -S mingw-w64-i686-nlohmann-json` or `pacman -S mingw-w64-x86_64-nlohmann-json` for installation. Please file issues [here](https://github.com/msys2/MINGW-packages/issues/new?title=%5Bnlohmann-json%5D) if you experience problems with the packages.
If you are using [MSYS2](https://www.msys2.org/), you can use the [mingw-w64-nlohmann-json](https://packages.msys2.org/base/mingw-w64-nlohmann-json) package, just type `pacman -S mingw-w64-i686-nlohmann-json` or `pacman -S mingw-w64-x86_64-nlohmann-json` for installation. Please file issues [here](https://github.com/msys2/MINGW-packages/issues/new?title=%5Bnlohmann-json%5D) if you experience problems with the packages.

If you are using [MacPorts](https://ports.macports.org), execute `sudo port install nlohmann-json` to install the [nlohmann-json](https://ports.macports.org/port/nlohmann-json/) package.

If you are using [`build2`](https://build2.org), you can use the [`nlohmann-json`](https://cppget.org/nlohmann-json) package from the public repository https://cppget.org or directly from the [package's sources repository](https://github.com/build2-packaging/nlohmann-json). In your project's `manifest` file, just add `depends: nlohmann-json` (probably with some [version constraints](https://build2.org/build2-toolchain/doc/build2-toolchain-intro.xhtml#guide-add-remove-deps)). If you are not familiar with using dependencies in `build2`, [please read this introduction](https://build2.org/build2-toolchain/doc/build2-toolchain-intro.xhtml).
Please file issues [here](https://github.com/build2-packaging/nlohmann-json) if you experience problems with the packages.
Expand Down Expand Up @@ -1591,6 +1595,8 @@ I deeply appreciate the help of the following people.
- [Amir Masoud Abdol](https://github.com/amirmasoudabdol) updated the Homebrew command as nlohmann/json is now in homebrew-core.
- [Hallot](https://github.com/Hallot) fixed some `-Wextra-semi-stmt warnings`.
- [Giovanni Cerretani](https://github.com/gcerretani) fixed `-Wunused` warnings on `JSON_DIAGNOSTICS`.
- [Bogdan Popescu](https://github.com/Kapeli) hosts the [docset](https://github.com/Kapeli/Dash-User-Contributions/tree/master/docsets/JSON_for_Modern_C%2B%2B) for offline documentation viewers.
- [Carl Smedstad](https://github.com/carlsmedstad) fixed an assertion error when using `JSON_DIAGNOSTICS`.

Thanks a lot for helping out! Please [let me know](mailto:mail@nlohmann.me) if I forgot someone.

Expand Down Expand Up @@ -1622,7 +1628,7 @@ The library itself consists of a single header file licensed under the MIT licen
- [**send_to_wandbox**](https://github.com/nlohmann/json/blob/develop/doc/scripts/send_to_wandbox.py) to send code examples to [Wandbox](https://wandbox.org)
- [**Travis**](https://travis-ci.org) for [continuous integration](https://travis-ci.org/nlohmann/json) on Linux and macOS
- [**Valgrind**](https://valgrind.org) to check for correct memory management
- [**Wandbox**](https://wandbox.org) for [online examples](https://wandbox.org/permlink/7p8sQckddTc0Y81T)
- [**Wandbox**](https://wandbox.org) for [online examples](https://wandbox.org/permlink/0LzTlmYG06u8qJN5)


## Projects using JSON for Modern C++
Expand Down
8 changes: 5 additions & 3 deletions cmake/ci.cmake
Expand Up @@ -13,7 +13,7 @@ execute_process(COMMAND ${ASTYLE_TOOL} --version OUTPUT_VARIABLE ASTYLE_TOOL_VER
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" ASTYLE_TOOL_VERSION "${ASTYLE_TOOL_VERSION}")
message(STATUS "🔖 Artistic Style ${ASTYLE_TOOL_VERSION} (${ASTYLE_TOOL})")

find_program(CLANG_TOOL NAMES clang++-HEAD clang++-12 clang++-11 clang++)
find_program(CLANG_TOOL NAMES clang++-HEAD clang++-13 clang++-12 clang++-11 clang++)
execute_process(COMMAND ${CLANG_TOOL} --version OUTPUT_VARIABLE CLANG_TOOL_VERSION ERROR_VARIABLE CLANG_TOOL_VERSION)
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" CLANG_TOOL_VERSION "${CLANG_TOOL_VERSION}")
message(STATUS "🔖 Clang ${CLANG_TOOL_VERSION} (${CLANG_TOOL})")
Expand Down Expand Up @@ -79,7 +79,7 @@ message(STATUS "🔖 Valgrind ${VALGRIND_TOOL_VERSION} (${VALGRIND_TOOL})")
find_program(GENHTML_TOOL NAMES genhtml)
find_program(PLOG_CONVERTER_TOOL NAMES plog-converter)
find_program(PVS_STUDIO_ANALYZER_TOOL NAMES pvs-studio-analyzer)
find_program(SCAN_BUILD_TOOL NAMES scan-build-11 scan-build)
find_program(SCAN_BUILD_TOOL NAMES scan-build-12 scan-build-11 scan-build)

# the individual source files
file(GLOB_RECURSE SRC_FILES ${PROJECT_SOURCE_DIR}/include/nlohmann/*.hpp)
Expand All @@ -96,6 +96,7 @@ file(GLOB_RECURSE SRC_FILES ${PROJECT_SOURCE_DIR}/include/nlohmann/*.hpp)
# -Wno-padded We do not care about padding warnings.
# -Wno-covered-switch-default All switches list all cases and a default case.
# -Wno-weak-vtables The library is header-only.
# -Wreserved-identifier See https://github.com/onqtam/doctest/issues/536.

set(CLANG_CXXFLAGS "-std=c++11 \
-Werror \
Expand All @@ -107,6 +108,7 @@ set(CLANG_CXXFLAGS "-std=c++11 \
-Wno-padded \
-Wno-covered-switch-default \
-Wno-weak-vtables \
-Wno-reserved-identifier \
")

# Ignored GCC warnings:
Expand Down Expand Up @@ -809,7 +811,7 @@ add_custom_target(ci_cmake_flags
# Use more installed compilers.
###############################################################################

foreach(COMPILER g++-4.8 g++-4.9 g++-5 g++-7 g++-8 g++-9 g++-10 clang++-3.5 clang++-3.6 clang++-3.7 clang++-3.8 clang++-3.9 clang++-4.0 clang++-5.0 clang++-6.0 clang++-7 clang++-8 clang++-9 clang++-10 clang++-11)
foreach(COMPILER g++-4.8 g++-4.9 g++-5 g++-7 g++-8 g++-9 g++-10 clang++-3.5 clang++-3.6 clang++-3.7 clang++-3.8 clang++-3.9 clang++-4.0 clang++-5.0 clang++-6.0 clang++-7 clang++-8 clang++-9 clang++-10 clang++-11 clang++-12)
find_program(COMPILER_TOOL NAMES ${COMPILER})
if (COMPILER_TOOL)
add_custom_target(ci_test_compiler_${COMPILER}
Expand Down
4 changes: 2 additions & 2 deletions doc/Doxyfile
Expand Up @@ -5,7 +5,7 @@
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "JSON for Modern C++"
PROJECT_NUMBER = 3.10.2
PROJECT_NUMBER = 3.10.3
PROJECT_BRIEF =
PROJECT_LOGO =
OUTPUT_DIRECTORY = .
Expand Down Expand Up @@ -252,7 +252,7 @@ MAN_LINKS = NO
#---------------------------------------------------------------------------
# Configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = YES
GENERATE_XML = NO
XML_OUTPUT = xml
XML_PROGRAMLISTING = YES
XML_NS_MEMB_FILE_SCOPE = NO
Expand Down

0 comments on commit aa0e847

Please sign in to comment.