kevinlul
e616d095ab
Remove boolean regression test for #1642
2019-06-30 11:57:57 -04:00
Niels Lohmann
1be63431f3
✨ make emplace_back return a reference #1609
2019-06-30 12:19:41 +02:00
Niels Lohmann
258fa798f1
✨ add contains function for JSON pointers
2019-06-30 10:03:08 +02:00
kevinlul
855156b5e8
Add regression tests for #1642
2019-06-29 19:26:38 -04:00
Isaac Nickaein
0a137b78ac
Appveyor: Set timeout of unit-tests in appveyor.yml instead of CMake
2019-06-22 22:14:40 +04:30
Isaac Nickaein
eba8244ead
Avoid collision of ::max with windows.h macro
2019-06-22 21:15:13 +04:30
Isaac Nickaein
4ac0fe2628
Increase timeout of test-unicode_all in Debug build
2019-06-22 21:15:03 +04:30
Taylor Howard
2f389cdde7
Added explicit converstion to std::string_view. Fixes failing test with GCC 8.3
2019-06-16 14:49:01 +10:00
Macr0Nerd
aa4c45ee4d
Added to_string (with ugly macro) and tests
2019-04-26 18:10:45 -05:00
Niels Lohmann
cf6b6692aa
Merge branch 'develop' into feature/fastcov
2019-04-06 09:03:35 +02:00
Niels Lohmann
f0bc16d899
🔨 overworked coverage targets
2019-04-06 09:02:17 +02:00
Niels Lohmann
b4b06d89b5
⬆️ updated fastcov
2019-04-06 00:24:19 +02:00
Niels Lohmann
e65cff2a8f
🔨 small cleanup
2019-04-05 23:31:04 +02:00
Niels Lohmann
0a1ddd6882
⬆️ updated fastcov
2019-04-05 07:54:46 +02:00
Niels Lohmann
4676f759e8
⬆️ updated fastcov
2019-04-04 09:50:27 +02:00
Niels Lohmann
da279234d5
Merge branch 'develop' into feature/fastcov
2019-04-04 09:03:11 +02:00
Niels Lohmann
f05614b240
🏗️ adding anonymous namespace
2019-04-04 08:56:36 +02:00
Niels Lohmann
1f03395e2c
Merge branch 'develop' of https://github.com/nlohmann/json into develop
2019-04-03 17:28:50 +02:00
Niels Lohmann
2f9095ddab
🔨 relaxed requirements to coverage
2019-04-03 17:28:47 +02:00
Niels Lohmann
ee8732c359
Merge pull request #1555 from theodelrieu/fix/1511
...
Fix/1511
2019-04-03 17:24:25 +02:00
Théo DELRIEU
d66abda4ee
tests: fix coverage
2019-04-03 12:34:15 +02:00
Théo DELRIEU
e6e6805c6c
add built-in array support in get_to
2019-04-01 17:47:45 +02:00
Théo DELRIEU
2806b201a8
make sure values are overwritten in from_json overloads
...
Caused unexpected behaviors when using get_to with values previously
set.
Fixes !1511
2019-04-01 17:47:42 +02:00
onqtam
da5b7833a0
fixing the remaining of the pedantic gcc/clang target warnings
2019-03-31 13:57:44 +03:00
Viktor Kirilov
64873fb5b8
Merge branch 'develop' into doctest
2019-03-30 23:23:33 +02:00
Niels Lohmann
53001414c7
🔨 using --exclude-gcov to exclude files
2019-03-30 17:00:30 +01:00
Niels Lohmann
b12287b362
⚗️ trying fastcov
2019-03-30 09:12:32 +01:00
Niels Lohmann
b21c04c938
🔥 removed unsupported flag
2019-03-29 17:34:58 +01:00
Niels Lohmann
191aa0fd6f
🔧 overworked maintaner targets
2019-03-28 14:22:48 +01:00
onqtam
a0000c3235
finished the last of the warnings
2019-03-27 01:09:47 +02:00
onqtam
5d511a6e96
fixed a bunch of warnings from the Makefile from the root of the repo
2019-03-27 00:58:53 +02:00
onqtam
0caf986505
reverted the removal of this if/else branching - this is the easiest way to get -std=c++0x support
2019-03-25 22:04:37 +02:00
onqtam
ff51a32be1
updated doctest to version 2.3.1 released today
2019-03-24 17:28:52 +02:00
onqtam
2b346099df
Merge branch 'develop' of https://github.com/nlohmann/json into doctest
2019-03-24 17:21:44 +02:00
Niels Lohmann
baaa2a4d0f
🏁 trying to use constructors from std::allocator #1536
2019-03-21 14:09:29 +01:00
Niels Lohmann
efa1b9a7bb
🔖 set version to 3.6.1
2019-03-20 20:50:05 +01:00
Niels Lohmann
b37392b7ac
🔖 set version to 3.6.0
2019-03-20 00:19:07 +01:00
Viktor Kirilov
155d196bfa
Update CMakeLists.txt
2019-03-18 17:58:35 +02:00
Viktor Kirilov
365944b0bc
Merge branch 'develop' into doctest
2019-03-18 16:59:36 +02:00
Niels Lohmann
b8451c236f
🚨 fixed warnings
2019-03-17 12:01:49 +01:00
Niels Lohmann
0c65ba960e
Merge branch 'develop' of https://github.com/nlohmann/json into develop
2019-03-13 22:14:57 +01:00
Niels Lohmann
546e2cbf5e
🚨 fixed some warnings
2019-03-13 22:14:53 +01:00
Niels Lohmann
c6fc902184
Merge pull request #1489 from andreas-schwab/develop
...
Do proper endian conversions
2019-03-13 11:57:58 +01:00
Niels Lohmann
c983b67112
Merge pull request #1469 from garethsb-sony/json_pointer-append
...
Add operator/= and operator/ to construct a JSON pointer by appending two JSON pointers
2019-03-11 22:47:08 +01:00
Niels Lohmann
3cd1dac653
🚨 fix MSVC warning #1502
2019-03-11 15:33:23 +01:00
Niels Lohmann
cabe2357b8
Merge pull request #1492 from stac47/fix_gcc9_allocator
...
Fix gcc9 build error test/src/unit-allocator.cpp (Issue #1472 )
2019-03-11 15:21:54 +01:00
Niels Lohmann
8eb7db7277
Merge pull request #1441 from iwanders/support-cmake-older-than-3-8-with-if
...
Use C++11 features supported by CMake 3.1.
2019-03-10 22:08:16 +01:00
Andreas Schwab
bb22b1003f
Do proper endian conversions
...
This fixes all testsuite failures on big endian hosts.
2019-02-25 12:09:13 +01:00
garethsb-sony
d183bd0456
Tests for json_pointer::empty and json_pointer::parent_pointer
2019-02-25 09:26:08 +00:00
Laurent Stacul
ddc9f201f4
Fix gcc9 build error test/src/unit-allocator.cpp (Issue #1472 )
2019-02-22 16:05:41 +00:00
Isaac Nickaein
e93f305494
Add unit-test for contains() member function
2019-02-13 13:21:54 +03:30
garethsb-sony
5da757bbb3
Attempt to satisfy Coveralls by adding a test for (unchanged) operator std::string
2019-01-31 23:39:57 +00:00
garethsb-sony
c850e9d82d
Add operator/= and operator/ to construct a JSON pointer by appending two JSON pointers, as well as convenience op/= and op= to append a single unescaped token or array index; inspired by std::filesystem::path
2019-01-31 19:15:50 +00:00
Isaac Nickaein
372c4d2125
Merge branch 'develop' into iterate-on-destruction
2019-01-28 02:41:22 +03:30
Patrick Boettcher
a06e7f5d80
JSON-pointer: add operator+() returning a new json_pointer
2019-01-24 16:46:51 +01:00
Niels Lohmann
e89c946451
Merge branch 'feature/nodiscard' into develop
2019-01-20 15:41:30 +01:00
Niels Lohmann
6de4df23e4
🐛 fixed integer overflow in dump function #1447
...
Closes #1447 .
2019-01-20 12:26:01 +01:00
Niels Lohmann
e17e0d031f
Merge pull request #1446 from scinart/develop
...
attempt to fix #1445 , flush buffer in serializer::dump_escaped in UTF8_REJECT case.
2019-01-20 12:18:02 +01:00
scinart
20db020c1f
move newly-added tests in unit-regression.cpp
2019-01-19 11:36:50 -05:00
Niels Lohmann
d359fd3a8d
🚧 trying nodiscard attribute #1433
2019-01-19 17:32:23 +01:00
scinart
83e84446d6
fix typo
2019-01-18 20:55:01 -05:00
scinart
899bd94b43
flush buffer in serializer::dump_escaped case UTF8_REJECT
...
serializer use fixed buffer. Whenever it is nearly full, it is flushed to `output_adapter_t<char> o`
But the code forgets to flush when there is a invalid utf8 code point
So there will be buffer overflow.
2019-01-18 20:35:48 -05:00
Ivor Wanders
4fd9b52fc2
Use C++11 features supported by CMake 3.1.
2019-01-16 08:50:58 -05:00
onqtam
a2c074fd4d
this should really fix the XCode 6/7 builds
2019-01-15 22:58:12 +02:00
onqtam
3340162efd
fixing osx builds - had forgotten to define this for the object file where the test runner is compiled
2019-01-15 22:48:37 +02:00
onqtam
2f44ac1def
moved from Catch to doctest for unit tests
2019-01-15 22:02:16 +02:00
Isaac Nickaein
47fe4b9cee
Add unit test for parsing deeply-nested array
2019-01-15 20:22:11 +03:30
Patrick Boettcher
9225cf2f57
allow push_back() and pop_back() calls on json_pointer
...
Putting pop_back() to public and creating a trivial push_back()
method allows users of nlohmann::json_pointer to manipulate an
existing json-pointer by adding or removing keys at the end.
This is useful for traversing a JSON-instance and keeping track
of its "absolute path" at any moment.
In my case for a schema-validator error-handler.
2019-01-15 14:43:46 +01:00
Niels Lohmann
06731b14d7
⬆️ upgraded Catch and Google Benchmark
...
- Catch 1.12.0 -> 1.12.2
- Google Benchmark 1.3.0 -> 1.4.1
2019-01-13 11:29:39 +01:00
Isaac Nickaein
c9dd260a4c
Add unit tests for dump_integer
...
Add some unit tests for formatting integers
to keep code coverage as before.
2019-01-12 08:58:30 -08:00
Isaac Nickaein
be9b4cbd60
Add benchmark for small integers
...
This benchmark is a sample of 1 million "small" integers
in range [-1000000 1000000) sampled from uniform distribution.
2019-01-12 08:58:30 -08:00
Yann E. MORIN
e8b6b7adc1
buildsystem: relax requirement on cmake version
...
Commit 73cc5089
(Using target_compile_features to specify C++ 11
standard) bumped the required cmake version, from 3.0 to 3.8, so
as to get the definition of target_compile_features().
However, target_compile_features() was introduced in cmake-3.1:
https://cmake.org/cmake/help/v3.1/command/target_compile_features.html
And using cmake-3.1 is indeed sufficient to properly build.
As such, relax the minimum required version down to cmake-3.1,
so we can build on oldish, entreprise-grade distributions that
only have cmake-3.1 (or at least, don't have up to cmake-3.8).
Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2018-12-31 18:52:04 +01:00
Niels Lohmann
6f89613acd
🚨 fixed some warnings
2018-12-23 13:56:18 +01:00
Niels Lohmann
78348afeb6
🔖 set version to 3.5.0
2018-12-21 23:52:29 +01:00
Niels Lohmann
d584ab269a
🎨 fixed header
2018-12-20 21:58:16 +01:00
Niels Lohmann
45a8a093d7
🚨 fixed a warning
2018-12-20 21:40:47 +01:00
Niels Lohmann
85849940ba
Merge pull request #1391 from pratikpc/develop
...
Added Support for Structured Bindings
2018-12-20 08:58:08 +01:00
Pratik Chowdhury
ebd3f45808
Added Support for Structured Bindings
...
For further details, read https://github.com/nlohmann/json/issues/1388 and https://blog.tartanllama.xyz/structured-bindings/
2018-12-19 20:17:52 +05:30
Niels Lohmann
5d390e91ff
Merge pull request #1392 from mtalliance/feature/addFileInputAdapter
...
Feature/add file input adapter
2018-12-16 22:10:03 +01:00
Jonathan Dumaresq
635a4fc344
use namespace std when possible. Change the name of private variable.
2018-12-12 16:33:25 -05:00
Jonathan Dumaresq
a794cfdba3
refactor unit test in case of throw, the fclose will not be called. using unique_ptr with custom destructor will ensure that
2018-12-12 14:46:17 -05:00
Jonathan Dumaresq
ef283e0cf8
add tests to cover the new input adapter
2018-12-12 10:18:37 -05:00
mefyl
aa10382629
Set eofbit on exhausted input stream.
...
Fix issue #1340 .
The eofbit is set manually since we don't go through the
stream interface. We could maybe use the stream interface
instead, but there are some assumptions regarding which
exception go through, so this seems to be the most prudent
approach for now.
2018-11-08 11:41:17 +01:00
Niels Lohmann
2f73a4d1f3
🚨 fixed a linter warning
2018-10-31 20:30:24 +01:00
Niels Lohmann
7b2f8cce03
🔖 set version to 3.4.0
2018-10-30 21:30:20 +01:00
Niels Lohmann
39419cd5c4
🚨 fixed another linter warning
2018-10-29 18:51:30 +01:00
Niels Lohmann
f0c1459554
🐛 fixed a bug parsing BSON strings #1320
2018-10-28 09:16:40 +01:00
Niels Lohmann
45a761bd60
Merge branch 'develop' of https://github.com/nlohmann/json into develop
2018-10-27 18:31:06 +02:00
Niels Lohmann
4e765596f7
🔨 small improvements
2018-10-27 18:31:03 +02:00
Niels Lohmann
85aaf91b85
Merge branch 'develop' into feature/enum_json_mapping
2018-10-27 16:52:59 +02:00
Niels Lohmann
ad639ad5e6
✨ added NLOHMANN_JSON_SERIALIZE_ENUM marco #1208
2018-10-26 14:48:20 +02:00
Niels Lohmann
d97fa30795
👌 fixed comment #1320
2018-10-25 22:29:27 +02:00
Niels Lohmann
19647e083c
🚨 fixed compiler warnings
2018-10-25 14:27:55 +02:00
Niels Lohmann
62126278a6
🔨 added fix for arrays
2018-10-25 13:01:18 +02:00
Niels Lohmann
1968e5c793
🎨 clean up binary formats
2018-10-24 23:39:30 +02:00
Niels Lohmann
4d1eaace8c
🔨 fixed fuzz code to avoid false positives in case of discarded values
2018-10-24 18:55:08 +02:00
Niels Lohmann
e2c5913a50
🚧 some changes to the BSON code
...
- added fuzz testers
- added some reference files
- made an exception text more clear
2018-10-24 15:43:37 +02:00
Niels Lohmann
bba159121f
Merge branch 'feature/bson' of https://github.com/julian-becker/json into julian-becker-feature/bson
2018-10-24 15:03:15 +02:00
Niels Lohmann
7b501de054
Merge pull request #1314 from nlohmann/feature/codec_errors
...
Allow to set error handler for decoding errors
2018-10-24 08:40:58 +02:00
Niels Lohmann
2343d9caeb
💚 additional tests from the Unicode spec #1198
...
Thanks @abolz!
2018-10-23 17:22:13 +02:00