Commit graph

15 commits

Author SHA1 Message Date
Théo DELRIEU 45c8af2c46
add new is_constructible_* traits used in from_json
is_compatible_* traits were used in from_json, but it made no sense
whatsoever.

It used to work because of non-SFINAE correctness + json_ref
unconstrained variadic template constructor.

SFINAE checks are becoming quite complex, we need a specification of
some sort describing:

* which concepts the library uses
* how the conversion to/from json works in detail

Having such a specification would really help simplifying the current
code (as well as having meaningful checks).

Fixes !1299
2018-10-16 14:00:34 +02:00
Niels Lohmann 858e75c4df
🚨 fixed some clang-tidy warnings 2018-10-07 18:39:18 +02:00
Niels Lohmann ebb3c03293
🎨 cleanup after #1228 2018-09-09 18:19:33 +02:00
Théo DELRIEU 4b4bbceebf
make from_json SFINAE-correct 2018-09-07 14:10:37 +02:00
Théo DELRIEU f7c8a2145a
refactor from/to_json(CompatibleArrayType) 2018-09-07 12:18:04 +02:00
Théo DELRIEU f6febbe359
split meta.hpp, add detected_t (used to define concepts) 2018-08-16 11:58:42 +02:00
Niels Lohmann 347e77bdc1
🚑 fix for #1169 2018-07-21 10:31:55 +02:00
Niels Lohmann bf348ca8a4
Merge pull request #1028 from gracicot/develop
Added support for string_view in C++17
2018-06-23 17:10:04 +02:00
Théo DELRIEU 2b37d7ed86
from_json: add overload for std::unordered_map
Fixes #1133
2018-06-18 15:14:10 +02:00
Théo DELRIEU 299469cfd5
from_json: add missing template arguments for std::map 2018-06-18 10:52:11 +02:00
Guillaume Racicot 7acd90b651 Fixed check for compatible string type 2018-06-04 11:18:19 -04:00
Théo DELRIEU c5e63fd684
Provide a from_json overload for std::map
This overload is chosen only when BasicJsonType::string_t
is not constructible from std::map::key_type.

Currently, converting a map to json treats it as an array of pairs.

fixes #1079
2018-05-28 11:06:24 +02:00
Guillaume Racicot 8165707990 basic_json now supports getting many type of strings 2018-03-15 15:35:00 -04:00
Théo DELRIEU 01d6118828
Fix constraints on from_json(CompatibleArrayType)
Fixes #924
2018-02-12 15:37:33 +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
Renamed from develop/detail/conversions/from_json.hpp (Browse further)