Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
f209be11
Commit
f209be11
authored
Sep 11, 2016
by
Niels
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/2.0.4'
parents
625370a1
768d6656
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
87 additions
and
46 deletions
+87
-46
.travis.yml
.travis.yml
+4
-0
CMakeLists.txt
CMakeLists.txt
+1
-1
ChangeLog.md
ChangeLog.md
+7
-0
README.md
README.md
+3
-3
Doxyfile
doc/Doxyfile
+1
-1
README.link
doc/examples/README.link
+2
-2
index.md
doc/index.md
+1
-1
json.gif
doc/json.gif
+0
-0
json.hpp
src/json.hpp
+3
-3
json.hpp.re2c
src/json.hpp.re2c
+3
-3
broken_file.json
test/data/regression/broken_file.json
+2
-0
working_file.json
test/data/regression/working_file.json
+2
-0
fuzz.cpp
test/src/fuzz.cpp
+1
-1
unit-algorithms.cpp
test/src/unit-algorithms.cpp
+1
-1
unit-allocator.cpp
test/src/unit-allocator.cpp
+1
-1
unit-capacity.cpp
test/src/unit-capacity.cpp
+1
-1
unit-class_const_iterator.cpp
test/src/unit-class_const_iterator.cpp
+1
-1
unit-class_iterator.cpp
test/src/unit-class_iterator.cpp
+1
-1
unit-class_lexer.cpp
test/src/unit-class_lexer.cpp
+1
-1
unit-class_parser.cpp
test/src/unit-class_parser.cpp
+1
-1
unit-comparison.cpp
test/src/unit-comparison.cpp
+1
-1
unit-concepts.cpp
test/src/unit-concepts.cpp
+1
-1
unit-constructor1.cpp
test/src/unit-constructor1.cpp
+1
-1
unit-constructor2.cpp
test/src/unit-constructor2.cpp
+1
-1
unit-convenience.cpp
test/src/unit-convenience.cpp
+1
-1
unit-conversions.cpp
test/src/unit-conversions.cpp
+1
-1
unit-deserialization.cpp
test/src/unit-deserialization.cpp
+1
-1
unit-element_access1.cpp
test/src/unit-element_access1.cpp
+1
-1
unit-element_access2.cpp
test/src/unit-element_access2.cpp
+1
-1
unit-inspection.cpp
test/src/unit-inspection.cpp
+1
-1
unit-iterator_wrapper.cpp
test/src/unit-iterator_wrapper.cpp
+1
-1
unit-iterators1.cpp
test/src/unit-iterators1.cpp
+1
-1
unit-iterators2.cpp
test/src/unit-iterators2.cpp
+1
-1
unit-json_patch.cpp
test/src/unit-json_patch.cpp
+1
-1
unit-json_pointer.cpp
test/src/unit-json_pointer.cpp
+1
-1
unit-modifiers.cpp
test/src/unit-modifiers.cpp
+1
-1
unit-pointer_access.cpp
test/src/unit-pointer_access.cpp
+1
-1
unit-readme.cpp
test/src/unit-readme.cpp
+1
-1
unit-reference_access.cpp
test/src/unit-reference_access.cpp
+1
-1
unit-regression.cpp
test/src/unit-regression.cpp
+27
-1
unit-serialization.cpp
test/src/unit-serialization.cpp
+1
-1
unit-testsuites.cpp
test/src/unit-testsuites.cpp
+1
-1
unit-unicode.cpp
test/src/unit-unicode.cpp
+1
-1
unit.cpp
test/src/unit.cpp
+1
-1
No files found.
.travis.yml
View file @
f209be11
...
@@ -213,6 +213,10 @@ install:
...
@@ -213,6 +213,10 @@ install:
if [[ "${LLVM_VERSION}" != "" ]]; then
if [[ "${LLVM_VERSION}" != "" ]]; then
LLVM_DIR=${DEPS_DIR}/llvm-${LLVM_VERSION}
LLVM_DIR=${DEPS_DIR}/llvm-${LLVM_VERSION}
if [[ -z "$(ls -A ${LLVM_DIR})" ]]; then
if [[ -z "$(ls -A ${LLVM_DIR})" ]]; then
travis_retry wget --quiet https://cmake.org/files/v3.6/cmake-3.6.1.tar.gz
tar xfz cmake-3.6.1.tar.gz
(cd cmake-3.6.1 && ./configure --prefix=${LLVM_DIR}/cmake && make install)
export PATH="${LLVM_DIR}/cmake/bin:${PATH}"
LLVM_URL="http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz"
LLVM_URL="http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz"
LIBCXX_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxx-${LLVM_VERSION}.src.tar.xz"
LIBCXX_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxx-${LLVM_VERSION}.src.tar.xz"
LIBCXXABI_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxxabi-${LLVM_VERSION}.src.tar.xz"
LIBCXXABI_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxxabi-${LLVM_VERSION}.src.tar.xz"
...
...
CMakeLists.txt
View file @
f209be11
cmake_minimum_required
(
VERSION 3.0
)
cmake_minimum_required
(
VERSION 3.0
)
# define the project
# define the project
project
(
nlohmann_json VERSION 2.0.
3
LANGUAGES CXX
)
project
(
nlohmann_json VERSION 2.0.
4
LANGUAGES CXX
)
enable_testing
()
enable_testing
()
...
...
ChangeLog.md
View file @
f209be11
# Change Log
# Change Log
All notable changes to this project will be documented in this file. This project adheres to
[
Semantic Versioning
](
http://semver.org/
)
.
All notable changes to this project will be documented in this file. This project adheres to
[
Semantic Versioning
](
http://semver.org/
)
.
## [v2.0.4](https://github.com/nlohmann/json/releases/tag/v2.0.4) (2016-09-11)
[
Full Changelog
](
https://github.com/nlohmann/json/compare/v2.0.3...v2.0.4
)
-
Parsing fails without space at end of file
[
\#306
](
https://github.com/nlohmann/json/issues/306
)
-
Unused variable warning
[
\#304
](
https://github.com/nlohmann/json/issues/304
)
## [v2.0.3](https://github.com/nlohmann/json/releases/tag/v2.0.3) (2016-08-31)
## [v2.0.3](https://github.com/nlohmann/json/releases/tag/v2.0.3) (2016-08-31)
[
Full Changelog
](
https://github.com/nlohmann/json/compare/v2.0.2...v2.0.3
)
[
Full Changelog
](
https://github.com/nlohmann/json/compare/v2.0.2...v2.0.3
)
...
...
README.md
View file @
f209be11
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
[

](https://travis-ci.org/nlohmann/json)
[

](https://travis-ci.org/nlohmann/json)
[

](https://ci.appveyor.com/project/nlohmann/json)
[

](https://ci.appveyor.com/project/nlohmann/json)
[

](https://coveralls.io/r/nlohmann/json)
[

](https://coveralls.io/r/nlohmann/json)
[

](http://melpon.org/wandbox/permlink/
zkFPohcXJ2TFuAyq
)
[

](http://melpon.org/wandbox/permlink/
MN72DYughLUXjVLk
)
[

](http://nlohmann.github.io/json)
[

](http://nlohmann.github.io/json)
[

](https://raw.githubusercontent.com/nlohmann/json/master/LICENSE.MIT)
[

](https://raw.githubusercontent.com/nlohmann/json/master/LICENSE.MIT)
[

](https://github.com/nlohmann/json/releases)
[

](https://github.com/nlohmann/json/releases)
...
@@ -430,7 +430,7 @@ The following compilers are currently used in continuous integration at [Travis]
...
@@ -430,7 +430,7 @@ The following compilers are currently used in continuous integration at [Travis]
| Clang Xcode 7.1 | Darwin Kernel Version 14.5.0 (OSX 10.10.5) | Apple LLVM version 7.0.0 (clang-700.1.76) |
| Clang Xcode 7.1 | Darwin Kernel Version 14.5.0 (OSX 10.10.5) | Apple LLVM version 7.0.0 (clang-700.1.76) |
| Clang Xcode 7.2 | Darwin Kernel Version 15.0.0 (OSX 10.10.5) | Apple LLVM version 7.0.2 (clang-700.1.81) |
| Clang Xcode 7.2 | Darwin Kernel Version 15.0.0 (OSX 10.10.5) | Apple LLVM version 7.0.2 (clang-700.1.81) |
| Clang Xcode 7.3 | Darwin Kernel Version 15.0.0 (OSX 10.10.5) | Apple LLVM version 7.3.0 (clang-703.0.29) |
| Clang Xcode 7.3 | Darwin Kernel Version 15.0.0 (OSX 10.10.5) | Apple LLVM version 7.3.0 (clang-703.0.29) |
| Clang Xcode 8.0 | Darwin Kernel Version 15.
5.0 (OSX 10.11.5) | Apple LLVM version 8.0.0 (clang-800.0.24.1
) |
| Clang Xcode 8.0 | Darwin Kernel Version 15.
6.0 (OSX 10.11.6) | Apple LLVM version 8.0.0 (clang-800.0.38
) |
| Visual Studio 14 2015 | Windows Server 2012 R2 (x64) | Microsoft (R) Build Engine version 14.0.25123.0 |
| Visual Studio 14 2015 | Windows Server 2012 R2 (x64) | Microsoft (R) Build Engine version 14.0.25123.0 |
...
@@ -512,7 +512,7 @@ To compile and run the tests, you need to execute
...
@@ -512,7 +512,7 @@ To compile and run the tests, you need to execute
$ make check
$ make check
===============================================================================
===============================================================================
All tests passed (890515
4
assertions in 35 test cases)
All tests passed (890515
8
assertions in 35 test cases)
```
```
For more information, have a look at the file
[
.travis.yml
](
https://github.com/nlohmann/json/blob/master/.travis.yml
)
.
For more information, have a look at the file
[
.travis.yml
](
https://github.com/nlohmann/json/blob/master/.travis.yml
)
.
doc/Doxyfile
View file @
f209be11
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "JSON for Modern C++"
PROJECT_NAME = "JSON for Modern C++"
PROJECT_NUMBER = 2.0.
3
PROJECT_NUMBER = 2.0.
4
PROJECT_BRIEF =
PROJECT_BRIEF =
PROJECT_LOGO =
PROJECT_LOGO =
OUTPUT_DIRECTORY = .
OUTPUT_DIRECTORY = .
...
...
doc/examples/README.link
View file @
f209be11
<a target="_blank" href="http://melpon.org/wandbox/permlink/zkFPohcXJ2TFuAyq"><b>online</b></a>
<a target="_blank" href="http://melpon.org/wandbox/permlink/MN72DYughLUXjVLk"><b>online</b></a>
\ No newline at end of file
\ No newline at end of file
doc/index.md
View file @
f209be11
...
@@ -268,4 +268,4 @@ The container functions known from STL have been extended to support the differe
...
@@ -268,4 +268,4 @@ The container functions known from STL have been extended to support the differe
@author
[
Niels Lohmann
](
http://nlohmann.me
)
@author
[
Niels Lohmann
](
http://nlohmann.me
)
@see https://github.com/nlohmann/json to download the source code
@see https://github.com/nlohmann/json to download the source code
@version 2.0.
3
@version 2.0.
4
doc/json.gif
View replaced file @
625370a1
View file @
f209be11
440 KB
|
W:
|
H:
440 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/json.hpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++
__| | __| | | | JSON for Modern C++
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
@@ -8592,7 +8592,7 @@ basic_json_parser_63:
...
@@ -8592,7 +8592,7 @@ basic_json_parser_63:
const
auto
offset_cursor
=
m_cursor
-
m_start
;
const
auto
offset_cursor
=
m_cursor
-
m_start
;
// no stream is used or end of file is reached
// no stream is used or end of file is reached
if
(
m_stream
==
nullptr
or
not
*
m_stream
)
if
(
m_stream
==
nullptr
or
m_stream
->
eof
()
)
{
{
// copy unprocessed characters to line buffer
// copy unprocessed characters to line buffer
m_line_buffer
.
clear
();
m_line_buffer
.
clear
();
...
@@ -10116,7 +10116,7 @@ basic_json_parser_63:
...
@@ -10116,7 +10116,7 @@ basic_json_parser_63:
json_pointer
top_pointer
=
ptr
.
top
();
json_pointer
top_pointer
=
ptr
.
top
();
if
(
top_pointer
!=
ptr
)
if
(
top_pointer
!=
ptr
)
{
{
basic_json
&
x
=
result
.
at
(
top_pointer
);
result
.
at
(
top_pointer
);
}
}
// get reference to parent of JSON pointer ptr
// get reference to parent of JSON pointer ptr
...
...
src/json.hpp.re2c
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++
__| | __| | | | JSON for Modern C++
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
@@ -7889,7 +7889,7 @@ class basic_json
...
@@ -7889,7 +7889,7 @@ class basic_json
const auto offset_cursor = m_cursor - m_start;
const auto offset_cursor = m_cursor - m_start;
// no stream is used or end of file is reached
// no stream is used or end of file is reached
if (m_stream == nullptr or
not * m_stream
)
if (m_stream == nullptr or
m_stream->eof()
)
{
{
// copy unprocessed characters to line buffer
// copy unprocessed characters to line buffer
m_line_buffer.clear();
m_line_buffer.clear();
...
@@ -9413,7 +9413,7 @@ class basic_json
...
@@ -9413,7 +9413,7 @@ class basic_json
json_pointer top_pointer = ptr.top();
json_pointer top_pointer = ptr.top();
if (top_pointer != ptr)
if (top_pointer != ptr)
{
{
basic_json& x =
result.at(top_pointer);
result.at(top_pointer);
}
}
// get reference to parent of JSON pointer ptr
// get reference to parent of JSON pointer ptr
...
...
test/data/regression/broken_file.json
0 → 100644
View file @
f209be11
{
"AmbientOcclusion"
:
false
,
"AnisotropicFiltering"
:
16
,
"FOV"
:
90
,
"FullScreen"
:
true
,
"MipmapLevel"
:
4
,
"RenderDistance"
:
4
,
"VSync"
:
true
,
"WindowResX"
:
1920
,
"WindowResY"
:
1080
}
\ No newline at end of file
test/data/regression/working_file.json
0 → 100644
View file @
f209be11
{
"AmbientOcclusion"
:
false
,
"AnisotropicFiltering"
:
16
,
"FOV"
:
90
,
"FullScreen"
:
true
,
"MipmapLevel"
:
4
,
"RenderDistance"
:
4
,
"VSync"
:
true
,
"WindowResX"
:
1920
,
"WindowResY"
:
1080
}
\ No newline at end of file
test/src/fuzz.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (fuzz test support)
__| | __| | | | JSON for Modern C++ (fuzz test support)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Run "make fuzz_testing" and follow the instructions.
Run "make fuzz_testing" and follow the instructions.
...
...
test/src/unit-algorithms.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-allocator.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-capacity.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-class_const_iterator.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-class_iterator.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-class_lexer.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-class_parser.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-comparison.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-concepts.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-constructor1.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-constructor2.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-convenience.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-conversions.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-deserialization.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-element_access1.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-element_access2.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-inspection.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-iterator_wrapper.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-iterators1.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-iterators2.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-json_patch.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-json_pointer.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-modifiers.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-pointer_access.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-readme.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-reference_access.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-regression.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
@@ -31,6 +31,8 @@ SOFTWARE.
...
@@ -31,6 +31,8 @@ SOFTWARE.
#include "json.hpp"
#include "json.hpp"
using
nlohmann
::
json
;
using
nlohmann
::
json
;
#include <fstream>
TEST_CASE
(
"regression tests"
)
TEST_CASE
(
"regression tests"
)
{
{
SECTION
(
"issue #60 - Double quotation mark is not parsed correctly"
)
SECTION
(
"issue #60 - Double quotation mark is not parsed correctly"
)
...
@@ -440,4 +442,28 @@ TEST_CASE("regression tests")
...
@@ -440,4 +442,28 @@ TEST_CASE("regression tests")
CHECK
(
at_integer
==
val_integer
);
CHECK
(
at_integer
==
val_integer
);
}
}
SECTION
(
"issue #304 - Unused variable warning"
)
{
// code triggered a "warning: unused variable" warning and is left
// here to avoid the warning in the future
json
object
;
json
patch
=
json
::
array
();
object
=
object
.
patch
(
patch
);
}
SECTION
(
"issue #306 - Parsing fails without space at end of file"
)
{
for
(
auto
filename
:
{
"test/data/regression/broken_file.json"
,
"test/data/regression/working_file.json"
})
{
CAPTURE
(
filename
);
json
j
;
std
::
ifstream
f
(
filename
);
CHECK_NOTHROW
(
j
<<
f
);
}
}
}
}
test/src/unit-serialization.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-testsuites.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit-unicode.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
test/src/unit.cpp
View file @
f209be11
/*
/*
__ _____ _____ _____
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 2.0.
3
| | |__ | | | | | | version 2.0.
4
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment