1
0
mirror of https://github.com/nlohmann/json.git synced 2026-07-27 06:03:04 +04:00
Commit Graph

59 Commits

Author SHA1 Message Date
Niels Lohmann ac3922c7aa Merge branch 'develop' of https://github.com/nlohmann/json into clang_windows
 Conflicts:
	include/nlohmann/detail/input/binary_reader.hpp
	include/nlohmann/detail/input/input_adapters.hpp
	include/nlohmann/detail/input/lexer.hpp
	include/nlohmann/detail/output/binary_writer.hpp
	include/nlohmann/json.hpp
	single_include/nlohmann/json.hpp
2020-06-27 13:14:48 +02:00
Thomas Braun ecbb2756fd json_pointer::array_index: Use unsigned values for the array index when parsing
The current code uses std::stoi to convert the input string to an int
array_index. This limits the maximum addressable array size to ~2GB on
most platforms.

But all callers immediately convert the result of array_index to
BasicJsonType::size_type.

So let's parse it as unsigned long long, which allows us to have as
big arrays as available memory. And also makes the call sites nicer to
read.

One complication arises on platforms where size_type is smaller than
unsigned long long. We need to bail out on these if the parsed array
index does not fit into size_type.
2020-06-22 13:42:55 +02:00
Niels Lohmann 5f862710fe 🔖 set version to 3.8.0 2020-06-14 17:16:45 +02:00
Niels Lohmann 65c4b07451 🎨 replace alternative operators (and, not, or) 2020-06-03 21:22:07 +02:00
Niels Lohmann d7b032f565 add tests to improve coverage 2020-05-13 21:28:43 +02:00
chenguoping f5a487d1b4 fix issue1982: contains() exceptions are incorrectly raised 2020-04-13 19:41:13 +08:00
chenguoping e07686f0c7 update array_index() and add testcases 2020-03-25 15:57:20 +08:00
Niels Lohmann c5eafe74e8 🔖 set version to 3.7.3 2019-11-17 12:09:12 +01:00
Niels Lohmann 56109eacd7 🔖 set version to 3.7.2 2019-11-10 21:23:39 +01:00
Niels Lohmann aacdc6bbe3 🔖 set version to 3.7.1 2019-11-06 18:37:26 +01:00
christian 7476f5ee0c Make json_pointer::back const (resolves #1764) 2019-10-01 00:57:27 +02:00
Niels Lohmann 48e1fe03b5 🔖 set version to 3.7.0 2019-07-28 20:20:41 +02:00
Niels Lohmann 258fa798f1 add contains function for JSON pointers 2019-06-30 10:03:08 +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 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 365944b0bc Merge branch 'develop' into doctest 2019-03-18 16:59:36 +02:00
garethsb-sony d183bd0456 Tests for json_pointer::empty and json_pointer::parent_pointer 2019-02-25 09:26:08 +00:00
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
Patrick Boettcher a06e7f5d80 JSON-pointer: add operator+() returning a new json_pointer 2019-01-24 16:46:51 +01:00
onqtam 2f44ac1def moved from Catch to doctest for unit tests 2019-01-15 22:02:16 +02:00
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 78348afeb6 🔖 set version to 3.5.0 2018-12-21 23:52:29 +01:00
Niels Lohmann 7b2f8cce03 🔖 set version to 3.4.0 2018-10-30 21:30:20 +01:00
Niels Lohmann 011b15dd08 added line positions to error messages
This is a follow-up to #1210.
2018-10-07 12:27:24 +02:00
Niels Lohmann b968faa882 🔖 set version to 3.3.0 2018-10-05 10:59:33 +02:00
Niels Lohmann 9f3857ef6f 🔖 set version to 3.2.0 2018-08-18 18:46:15 +02:00
Niels Lohmann ed69e50ad2 📄 added SPDX-License-Identifier 2018-05-03 17:41:45 +02:00
Niels Lohmann afef474c0d 🔖 set version to 3.1.2 2018-03-14 21:09:27 +01:00
Niels Lohmann 938c861a09 🔖 set version to 3.1.1 2018-02-12 22:59:36 +01:00
Niels Lohmann 0258484626 🔖 set version to 3.1.0
- updated documentation wrt. new repository layout
- temporarily switched off Homebrew --HEAD building (can only be switched on after release)
- set copyright date to 2018
2018-02-01 22:20:26 +01:00
Théo DELRIEU 14cd019861 fix cmake install directory (for real this time)
* Rename 'develop' folder to 'include/nlohmann'
* Rename 'src' folder to 'single_include/nlohmann'
* Use <nlohmann/*> headers in sources and tests
* Change amalgamate config file
2018-02-01 11:06:51 +01:00
Niels Lohmann 57e6fddd90 🚨 fixed warnings 2018-01-30 23:57:49 +01:00
Niels Lohmann 92484f0caf 🔖 set version to 3.0.1 2017-12-29 18:31:13 +01:00
Niels Lohmann ebc6849b71 added test for #894 2017-12-29 16:53:04 +01:00
Niels Lohmann 9e3c4ad11f 🔖 set version to 3.0.0 2017-12-17 08:31:18 +01:00
Niels Lohmann 647711fad1 improved test coverage 2017-09-14 17:31:28 +02:00
Niels Lohmann 8b123107c0 🔨 fixed some pedantic GCC warnings 2017-07-07 22:41:22 +02:00
Niels Lohmann 8fcd01631f improved test coverage
Tests for parse_error.109 were missing.
2017-03-08 16:39:17 +01:00
Niels Lohmann 38c2e20ce8 added user-defined exceptions 404-405 2017-03-05 23:25:22 +01:00
Niels Lohmann 30331fa21f 🔨 added user-defined exception 403 2017-03-05 23:16:17 +01:00
Niels Lohmann 60da36aee2 🔨 added user-defined exceptions 401-402 2017-03-05 22:56:39 +01:00
Niels Lohmann 9e560ca40c 🔨 added user-defined exceptions 313-315 2017-03-05 19:58:26 +01:00
Niels Lohmann 776758d7a2 🔨 added user-defined exception 109
This exception occurs when a JSON pointer contains an array index that
can not be converted into a number.
2017-03-03 12:54:37 +01:00
Niels Lohmann b86d2148ef 🔨 added user-defined exceptions 106-108
These exceptions occur when JSON pointers are malformed.
2017-03-03 11:56:58 +01:00
Niels Lohmann 27c65b860b 🔖 version 2.1.1 2017-02-25 16:34:38 +01:00
Niels Lohmann d870826811 🔖 set version to 2.1.0 2017-01-28 16:03:35 +01:00
Niels Lohmann 8b46eb8ec0 📄 it's 2017 already 2017-01-02 09:40:00 +01:00
Niels Lohmann 60b3703c62 🔖 version bump to 2.0.10 2017-01-02 09:35:57 +01:00