Commit graph

44 commits

Author SHA1 Message Date
Niels Lohmann
6154d50a9f
Merge pull request #2115 from nlohmann/issue2089
Do not include <ciso646> when using C++17
2020-05-17 12:17:17 +02:00
Niels Lohmann
9adb1c0235
🏁 do not include <ciso646> unless old MSVC is used #2089 2020-05-07 09:43:41 +02:00
Niels Lohmann
c10bc7efdd
🔥 remove pretty-print code for binary values 2020-05-06 22:13:08 +02:00
Niels Lohmann
2e5727d778
🐛 properly pass serialize_binary to dump function #2067 2020-04-27 15:10:23 +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
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
3bc9e053c9
Merge pull request #1969 from dota17/dota17-warning
fix warnings in serializer.hpp for VS2019
2020-04-17 10:10:38 +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
chenguoping
59cb4c93be fix C26451 warnning in serializer.hpp for VS2019 2020-03-23 16:08:47 +08:00
Thomas Braun
6ce2f35ba8 Fix outputting extreme integer values in edge cases
For some gcc version (Ubuntu 5.5.0-12ubuntu1~16.04) the existing code
crashes when the minimum value of int64_t is outputted.

Resurrect the code from before 546e2cbf (🚨 fixed some warnings,
2019-03-13) but delegate the sign removal so that the compilers don't
complain about taking the negative value of an unsigned value.

In addition we also rewrite the expression so that we first increment
and then negate.

The definition of remove_sign(number_unsigned_t) is never called as
unsigned values are never negative.
2019-09-03 13:55:15 +02:00
Niels Lohmann
90798caa62
🚚 rename Hedley macros 2019-07-01 22:37:30 +02:00
Niels Lohmann
897362191d
🔨 add NLOHMANN_JSON prefix and undef macros 2019-07-01 22:24:39 +02:00
Niels Lohmann
1720bfedd1
⚗️ add Hedley annotations 2019-06-30 22:14:02 +02:00
Niels Lohmann
8d3f4f21bc
🔨 clean up 2019-03-18 13:53:48 +01:00
Niels Lohmann
56f6d1d68e
💚 fix CI and #1521 2019-03-17 15:20:22 +01:00
Niels Lohmann
b8451c236f
🚨 fixed warnings 2019-03-17 12:01:49 +01:00
Niels Lohmann
34f8b4f711
🚨 fixed more warnings 2019-03-17 00:27:44 +01:00
Niels Lohmann
27011e3718
🚨 fixed warnings 2019-03-15 14:55:13 +01:00
Niels Lohmann
546e2cbf5e
🚨 fixed some warnings 2019-03-13 22:14:53 +01:00
Niels Lohmann
6de4df23e4
🐛 fixed integer overflow in dump function #1447
Closes #1447.
2019-01-20 12:26:01 +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
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
da81e7be22
🏁 adding parentheses around std::snprintf calls #1337 2018-11-09 21:18:02 +01:00
Niels Lohmann
d2e4f0b0d9
✏️ fixed some typos 2018-10-28 14:20:20 +01:00
Niels Lohmann
544150d5a5
🚨 fixed another linter warning 2018-10-26 11:10:49 +02:00
Niels Lohmann
7ce720b700
🚨 fixed coverage 2018-10-25 18:21:50 +02:00
Niels Lohmann
19647e083c
🚨 fixed compiler warnings 2018-10-25 14:27:55 +02:00
Niels Lohmann
87ef3f25f2
✏️ fixed a typo #1314 2018-10-23 22:56:10 +02:00
Niels Lohmann
c51b1e6fab
🚧 fixed an issue with ensure_ascii #1198 2018-10-22 15:53:36 +02:00
Niels Lohmann
c7af027cbb
🚧 respect ensure_ascii parameter #1198 2018-10-22 09:18:16 +02:00
Niels Lohmann
e5dce64115
💚 added tests #1198
Test every prefix of Unicode sequences against the different dump functions.
2018-10-21 23:26:25 +02:00
Niels Lohmann
c5821d91e5
🚧 overworked error handlers #1198 2018-10-21 11:49:37 +02:00
Niels Lohmann
0671e92ced
🚧 proposal for different error handlers #1198
Proof of concept; currently only as parameter to the internal dump_escaped function; that is, not yet exposed to the dump function.
2018-10-16 20:38:50 +02:00
Niels Lohmann
6e49d9f5ff
🚑 fixed compilation error 2018-10-07 21:34:40 +02:00
Niels Lohmann
858e75c4df
🚨 fixed some clang-tidy warnings 2018-10-07 18:39:18 +02:00
Niels Lohmann
ec95438a59
🚨 fixed some linter warnings 2018-10-06 13:49:02 +02:00
Niels Lohmann
c61a9071ae
🚨 fixed a compilation issue with ICPC #755
Closes #1222
2018-09-29 11:50:14 +02:00
Théo DELRIEU
f6febbe359
split meta.hpp, add detected_t (used to define concepts) 2018-08-16 11:58:42 +02:00
Théo DELRIEU
2c920a1032
run make amalgamate 2018-06-18 15:14:10 +02:00
Matthias Möller
ecadcdb593 added char cast
should fix the GCC unittest
2018-05-31 16:36:16 +02:00
Matthias Möller
64acb42aa7 remove stringstream dependency 2018-05-31 13:45:58 +02: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
Renamed from develop/detail/output/serializer.hpp (Browse further)