Commit graph

270 commits

Author SHA1 Message Date
Niels Lohmann
3cd1dac653
🚨 fix MSVC warning #1502 2019-03-11 15:33:23 +01:00
Niels Lohmann
5047c7a217
🐛 added missing include #1500 2019-03-10 22:26:57 +01:00
lieff
7b31e56fbf fix GCC 7.1.1 - 7.2.1 on CentOS
closes https://github.com/nlohmann/json/issues/670
2019-02-25 16:38:22 +03:00
Niels Lohmann
e326df211b
Merge pull request #1474 from nickaein/develop
Implement contains() member function
2019-02-13 13:05:21 +01:00
Niels Lohmann
c55cacee1e
Merge pull request #1477 from nickaein/fix-doc
Fix documentation
2019-02-13 13:03:46 +01:00
Isaac Nickaein
6a5db00951 Implement contains() to check existence of a key 2019-02-13 13:21:54 +03:30
Isaac Nickaein
fb5ceb26ac Fix documentation
Remove two instance of duplicate paragraphs.
2019-02-11 17:00:48 +03:30
past-due
45819dce54 Disable -Wmismatched-tags warning on tuple_size / tuple_element 2019-01-30 12:59:50 -05: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
Niels Lohmann
e36593e960
🔨 trying code from https://godbolt.org/z/-tLO1K 2019-01-20 11:12:20 +01:00
Niels Lohmann
d359fd3a8d
🚧 trying nodiscard attribute #1433 2019-01-19 17:32:23 +01:00
Niels Lohmann
b9a39b38bf
Merge pull request #1434 from pboettch/develop
allow push_back() and pop_back() calls on json_pointer
2019-01-19 17:07:36 +01: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
Patrick Boettcher
d0c0d16110 🚨 fixed unused variable warning
Since 6503e83e74 "Improve dump_integer performance by implementing a more efficient int2ascii"
an unused variable and thus a warning existed.
2019-01-15 15:21:02 +01: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
e5753b14a8
🚨 fixed another linter warning #1400
Closes #1400.
2019-01-13 15:40:49 +01:00
Niels Lohmann
5c04cc1009
🔨 fixed includes 2019-01-13 15:31:22 +01:00
Niels Lohmann
8e9ad346d9
🚨 fixed another linter warning 2019-01-13 13:00:54 +01:00
Niels Lohmann
ad01736d55
💡 improved documentation for parsing without exceptions #1405
Closes #1405
2019-01-13 11:46:05 +01:00
Isaac Nickaein
6503e83e74 Improve dump_integer performance by implementing a more efficient int2ascii
This commits implements a faster int2ascii inspired by "Fastware" talk given
by Andrei Alexandrescu.
See: https://www.youtube.com/watch?v=o4-CwDo2zpg
2019-01-12 08:58:30 -08:00
Niels Lohmann
c682b9879b
🚨 fixed PVS V567 warning
"V567 The modification of the 'position.chars_read_current_line' variable is unsequenced relative to another operation on the same variable. This may lead to undefined behavior."
2018-12-30 23:00:15 +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
1107f8cd82
📝 updated documentation for items() function 2018-12-21 22:51:12 +01:00
Niels Lohmann
45f5611d9b
🚨 fixed two warnings 2018-12-20 22:41:48 +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
4f270e38cc
Merge pull request #1342 from davedissian/bugfix/sfinae-iterator-traits
Add a SFINAE friendly iterator_traits and use that instead.
2018-12-19 08:24:18 +01:00
David Avedissian
f1080d7c39 Code review. 2018-12-18 20:44:37 +00:00
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
c1c85b025c Forget one std::FILE 2018-12-14 07:33:28 -05: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
cf31193de2 create single json.hpp file 2018-12-12 14:46:52 -05:00
Jonathan Dumaresq
fa7f1a524e new unified json.hpp generated with make amalgamate 2018-12-12 10:19:22 -05:00
Jonathan Dumaresq
3335da622a remove non usefull code. 2018-12-12 09:32:52 -05:00
Jonathan Dumaresq
67b0daf27b Add the possibility of using FILE * from cstdio library to read a file. This enable the possibility of using low eand device with this library. 2018-12-11 09:33:30 -05:00
David Avedissian
2c23f0a346 Changes requested from code review. 2018-12-08 15:46:33 +00:00
Niels Lohmann
ef90d62ddf
🚨 fixed warning #1364 2018-11-21 21:17:38 +01:00
Niels Lohmann
da81e7be22
🏁 adding parentheses around std::snprintf calls #1337 2018-11-09 21:18:02 +01:00
Niels Lohmann
f80efd3954
💄 cleanup 2018-11-09 21:10:32 +01:00
Niels Lohmann
35829928da
Merge pull request #1343 from mefyl/develop
Set eofbit on exhausted input stream.
2018-11-09 21:07:36 +01: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
Axel Huebl
798754dfb6
Amalgamate Headers 2018-11-08 10:35:45 +01:00
David Avedissian
f665a92330 Implement SFINAE friendly iterator_traits and use that instead. 2018-11-07 18:39:25 +00: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
8cee0e38d9
🚑 fixed #1319 2018-10-30 17:29:05 +01:00
Niels Lohmann
856fc31d0a
💄 fixed indentation 2018-10-29 19:44:19 +01:00