Commit graph

1207 commits

Author SHA1 Message Date
Niels Lohmann 3fa94f0755
add tests for binary type 2020-05-09 13:46:24 +02:00
Niels Lohmann f0c6ab4d3b
🐛 fix bug in SAX callback parser 2020-05-08 14:21:11 +02:00
Niels Lohmann cf4a6552f3
add tests for binary serialization 2020-05-06 22:24:48 +02:00
Niels Lohmann 3cd2a977ae
add test for get_ptr<binary_t*> 2020-05-06 22:13:55 +02:00
Niels Lohmann 1d6f7b0d4e
add tests for binary serialization 2020-05-06 22:13:31 +02:00
Niels Lohmann ddff459fa3
add test for BSON binary subtype 2020-05-06 21:24:00 +02:00
Niels Lohmann 2b39efd545
add tests for binary type 2020-05-05 12:59:57 +02:00
Niels Lohmann 908941b87d
fix test cases 2020-05-05 07:47:20 +02:00
Niels Lohmann 2a34f4cd63
add tests for binary type 2020-05-04 22:07:50 +02:00
Niels Lohmann a50a14088c
Merge pull request #2081 from nlohmann/external_test_data
Use external test data
2020-05-04 20:58:02 +02:00
Niels Lohmann e7a88b2d7f
💚 fix AppVeyor and Travis builds 2020-05-03 19:33:01 +02:00
Niels Lohmann 24237af983
🎨 fix format 2020-05-03 13:40:23 +02:00
Niels Lohmann 2f0d37d7d2
🔥 remove fastcov 2020-05-02 23:48:11 +02:00
Niels Lohmann 929f5d398c
🔨 fix coverage tests 2020-05-02 23:24:21 +02:00
Niels Lohmann 752c62b4bd
🔨 remove double tests 2020-05-02 16:07:09 +02:00
Niels Lohmann f0050c9ba0
Merge pull request #2019 from dota17/contains_v2
fix #1982:json_pointer.contains() exception is incorrectly raised
2020-05-02 11:04:57 +02:00
Niels Lohmann bec554936c
🔨 fix paths 2020-05-02 10:56:01 +02:00
Niels Lohmann cfb2f34ebb
🔨 fix benchmarks 2020-05-01 20:59:47 +02:00
Niels Lohmann ec5cfdd307
🔨 properly find and use Git 2020-05-01 16:18:04 +02:00
Niels Lohmann 7ade3a0efb
remove dependency to FetchContent 2020-05-01 15:14:37 +02:00
Niels Lohmann dbf1a1f413
♻️ download test data from external repository 2020-05-01 14:32:37 +02:00
Niels Lohmann c9f404dc98
Merge pull request #2076 from rmisev/patch-1
Fix error message about invalid surrogate pairs
2020-05-01 12:47:39 +02:00
Niels Lohmann b27d8a3253
Merge pull request #2074 from ArthurSonzogni/develop
Add CMake fetchcontent documentation and tests
2020-05-01 12:42:29 +02:00
Rimas Misevičius 6f1800889a Fix tests 2020-05-01 00:59:12 +03:00
Rimas Misevičius 4c053e3ec9 Fix tests 2020-05-01 00:48:24 +03:00
ArthurSonzogni c331706644 Add CMake fetchcontent documentation and tests
Github issue:
https://github.com/nlohmann/json/issues/2073

nlohmann::json documents 2 way of depending on it using CMake
1) Copy-paste the project/source into your own project.
2) Install nlohman::json and then use find_package.

(1) pollutes your git repository, (2) requires everyone to install the
dependencies themselves.

Since 2018, CMake provide some kind of 'package manager' features using
[FetchContent](https://cmake.org/cmake/help/v3.17/module/FetchContent.html)
It gives the following:
~~~cmake
include(FetchContent)

FetchContent_Declare(json
  GIT_REPOSITORY https://github.com/nlohmann/json
  GIT_TAG v3.7.3)

FetchContent_GetProperties(json)
if(NOT json_POPULATED)
  FetchContent_Populate(json)
  add_subdirectory( ${json_SOURCE_DIR} ${json_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()
~~~

Then declares the dependency in the target using it:
~~~cmake
target_link_library(my_project PRIVATE nlohmann_json::nlohmann_json
~~~

This patch updates the documentation and provides tests.
2020-04-29 18:28:06 +02:00
Niels Lohmann 2e5727d778
🐛 properly pass serialize_binary to dump function #2067 2020-04-27 15:10:23 +02:00
Niels Lohmann 9e0180b698
🐛 fix returning reference to local temporary object #2064 2020-04-27 14:43:49 +02:00
Niels Lohmann 63afc8e3f8
Merge pull request #2043 from dota17/unit-constructor1
Add missing testcase about NaN in unit-constructor1.cpp
2020-04-21 07:35:44 +02:00
Niels Lohmann a29e3b1318
Merge pull request #2054 from nlohmann/feature/issue1983
Fix bug in diff function
2020-04-20 19:44:35 +02:00
Niels Lohmann c0a39b22a6
🚨 fix compiler warning 2020-04-20 19:42:58 +02:00
Niels Lohmann 3607687a14
Merge pull request #2053 from nlohmann/gcc10warnings
Fix GCC compiler warnings
2020-04-20 08:05:42 +02:00
Niels Lohmann 721a1a0b5d
Merge pull request #2051 from nlohmann/clang10warnings
Fix Clang compiler warnings
2020-04-20 08:04:23 +02:00
chenguoping c379d02b3e Add missing testcase about NaN in unit-constructor1.cpp 2020-04-20 10:25:44 +08:00
Niels Lohmann e8356928bd
🚨 fix compiler warnings #2052 2020-04-19 13:25:02 +02:00
Niels Lohmann 4fb0795ec1
🚨 fix compiler warnings #2049 2020-04-19 13:01:36 +02:00
Niels Lohmann 45d5b09425
⬆️ doctest 2.3.7 #2048 2020-04-19 12:33:42 +02:00
Niels Lohmann f2b43a36b2
Merge pull request #1662 from OmnipotentEntity/develop
Add binary type support to all binary file formats, as well as an internally represented binary type
2020-04-16 11:14:32 +02:00
Michael Reilly 012c9665ac Add binary type support to all binary file formats, as well as an internally represented binary type 2020-04-14 10:22:45 -04:00
Niels Lohmann dd04a32918
🐛 fix bug in diff function #1983 2020-04-13 14:35:36 +02:00
chenguoping f5a487d1b4 fix issue1982: contains() exceptions are incorrectly raised 2020-04-13 19:41:13 +08:00
Niels Lohmann b7be613b6e
Merge pull request #1990 from dota17/json_pointer
catch exceptions for json_pointer : ..../+99
2020-04-13 13:29:33 +02:00
Niels Lohmann 6121fc52cf
🎨 fix indentation 2020-04-10 13:22:58 +02:00
Artöm Bakri Al-Sarmini 8db02bcc55 Fix for gcc 2020-04-08 15:53:14 +03:00
Artöm Bakri Al-Sarmini fec0bdd93b still fixing 2020-04-08 00:42:03 +03:00
Artöm Bakri Al-Sarmini 4ce31695f1 Fixed formatting, trying to fix msvc build error in appveyor 2020-04-08 00:26:43 +03:00
Artöm Bakri Al-Sarmini a74a031bba Fix build error 2020-04-02 15:47:08 +03:00
Artöm Bakri Al-Sarmini e4d8dc02e8 Fixes #1971 (memory leak in basic_json::push_back) 2020-04-02 15:20:25 +03:00
chenguoping e07686f0c7 update array_index() and add testcases 2020-03-25 15:57:20 +08:00
Antoine Cœur 8d92ca865f Some typos 2020-02-02 17:29:37 +08:00