Commit graph

121 commits

Author SHA1 Message Date
Niels Lohmann
a9809f3381
🏁 revert change that breaks with MSVC 2020-06-22 23:02:28 +02:00
Niels Lohmann
8b3d2399a4
🚨 remove warnings 2020-06-22 22:32:21 +02:00
Niels Lohmann
b64002bbca
♻️ extract common code to function 2020-06-19 13:24:08 +02:00
Niels Lohmann
88a37010d6
🐛 serialize 32-bit floating-point numbers as float 32 in MessagePack (0xCA) #2196 2020-06-17 21:14:23 +02:00
Niels Lohmann
a82c80e9af
Merge pull request #2125 from nlohmann/binary_type
Clean up implementation of binary type
2020-05-20 18:58:29 +02:00
Niels Lohmann
b7ff40029a
💥 change serialization of binary values 2020-05-18 13:53:20 +02:00
gistrec
454480f581 fixed a compilation error in MSVC 2020-05-18 14:57:04 +07:00
Niels Lohmann
904642f261
♻️ rename internal_binary_t with binary_t 2020-05-17 22:50:27 +02:00
Niels Lohmann
dead99eb0e
🔨 overwork binary subtypes 2020-05-17 13:51:59 +02:00
Niels Lohmann
ab6e76dd05
Merge branches 'binary_type' and 'develop' of https://github.com/nlohmann/json into binary_type 2020-05-17 12:27:58 +02:00
Niels Lohmann
3799b3f8dd
Merge pull request #2116 from nlohmann/issue2113
Fix warnings from Clang 10 and GCC 9
2020-05-17 12:19:06 +02:00
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
28e20bd9e4
🚨 fix warnings #2113 2020-05-16 14:26:17 +02:00
Niels Lohmann
c0cf67ead3
Merge branch 'develop' of https://github.com/nlohmann/json into binary_type 2020-05-16 12:58:13 +02:00
Niels Lohmann
f40a9f876a
Merge pull request #2044 from dota17/issue#1719
Fix issue#1719
2020-05-16 12:57:00 +02:00
Niels Lohmann
3ed059f6ff
revert faulty changes 2020-05-16 12:56:18 +02:00
Niels Lohmann
bc1886fb60
♻️ refine interface of wrapped_binary_t 2020-05-15 23:21:49 +02:00
chenguoping
5dd27f1a9f compare against max float and min float before converting 2020-05-15 21:47:59 +08:00
chenguoping
779a0ec7df update 2020-05-15 17:35:43 +08:00
chenguoping
e175150f5b fix UBSAN 2020-05-14 20:54:47 +08:00
chenguoping
44fe284f9d Enhace to_cbor() to support +/-Infinity, NaN, and single-precision float 2020-05-14 15:10:44 +08:00
Niels Lohmann
0857140839
Merge pull request #1950 from FrancoisChabot/issues/1457
templated input adapters
2020-05-14 07:52:02 +02:00
Niels Lohmann
d7b032f565
add tests to improve coverage 2020-05-13 21:28:43 +02:00
Niels Lohmann
a4266bbb7d
Merge branch 'develop' into issues/1457 2020-05-13 12:48:46 +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
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
chenguoping
59cb4c93be fix C26451 warnning in serializer.hpp for VS2019 2020-03-23 16:08:47 +08:00
Francois Chabot
c7282d5b1e simpler endian detection for older gcc versions 2020-02-20 10:19:29 -05:00
Francois Chabot
770ae6e9da accomodate older gcc 2020-02-19 16:54:09 -05:00
Francois Chabot
2e2cf02cfd duck-typed object input adapters 2020-02-19 14:59:31 -05:00
Niels Lohmann
61b46a56fb
🏗️ replace is_pod by is_trivial 2020-02-15 10:12:27 +01:00
Michael Balszun
5c045f7d0a Use correct accumulator type in binary_writer if size_t != ul
- Also fixes warning in msvc about possible loss of data in
  that size computation.
2019-11-19 11:06:45 +01:00
Xav83
13a7c60257 Correct a warning from cppcheck:
binary_writer.hpp:869: (style) Consider using std::accumulate algorithm instead of a raw loop.

910a7d2b87/checks (step):5:107

Signed-off-by: Xav83 <x.jouvenot@gmail.com>
2019-09-20 11:45:38 +02: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
a501365ea2
Merge branch 'feature/hedley' into develop 2019-07-14 20:58:08 +02:00
Niels Lohmann
b17440c12f
🚨 fix compiler warnings 2019-07-12 21:05:16 +02:00
Niels Lohmann
947656544d
🚨 fix warnings 2019-07-02 21:06:42 +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