Théo DELRIEU
8711ec6034
support construction from other basic_json types
...
Before this patch, `basic_json` types with different template arguments
were treated as `CompatibleArrayType`. Which sometimes leads to recursive
calls and stack overflows.
This patch adds a constructor and a `get` overload to deal with
different `basic_json` types.
2018-02-27 16:48:09 +01:00
Théo DELRIEU
c22f2d41f3
missing CHECK_NOTHROW in unit-udt
2018-02-27 11:09:53 +01:00
Niels Lohmann
938c861a09
🔖 set version to 3.1.1
2018-02-12 22:59:36 +01:00
Théo DELRIEU
01d6118828
Fix constraints on from_json(CompatibleArrayType)
...
Fixes #924
2018-02-12 15:37:33 +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
Théo DELRIEU
dcee778c1e
fix sfinae on basic_json UDT constructor
...
Avoid compiler errors when performing SFINAE checks on basic_json
and incomplete types.
2018-01-17 12:17:38 +01:00
Niels Lohmann
92484f0caf
🔖 set version to 3.0.1
2017-12-29 18:31:13 +01:00
Niels Lohmann
9e3c4ad11f
🔖 set version to 3.0.0
2017-12-17 08:31:18 +01:00
Jamie Seward
19f8f1c075
Add missing "u8"
...
This causes test-udt to crash due to bad iterator
2017-10-16 00:21:38 -07:00
Niels Lohmann
c7afb34e57
🎨 cleanup after #496
...
Ran “make pretty” and added a note to the README file.
2017-03-11 16:01:26 +01:00
Ted Lyngmo
9cfb777b65
Fix -Weffc++ warnings (GNU 6.3.1)
2017-03-11 13:56:38 +01:00
Niels Lohmann
27c65b860b
🔖 version 2.1.1
2017-02-25 16:34:38 +01:00
Tushar Maheshwari
85ce4d7b53
⚡ cmake compile time reduce using cotire
...
- Add prefix header
- Include catch.hpp
- Include json.hpp
- Replace private with public for all json_unit files
- Move `unit.cpp` to an object library
- cotire issue: strip whitespace from CMAKE_INCLUDE_SYSTEM_FLAG_CXX
2017-02-19 13:35:54 +05:30
Niels Lohmann
d870826811
🔖 set version to 2.1.0
2017-01-28 16:03:35 +01:00
Niels Lohmann
030cf674ef
🚧 fixed a warning
2017-01-24 12:49:38 +01:00
Niels Lohmann
3857e55290
💄 ran "make pretty"
2017-01-24 12:43:43 +01:00
Théo DELRIEU
9f103d19d7
add implicit conversions test (operator T())
2017-01-22 14:23:24 +01:00
Théo DELRIEU
9f8b270ed9
fix some warnings
2017-01-22 14:07:28 +01:00
Théo DELRIEU
7f359017d2
rename template argument Json -> BasicJsonType
2017-01-21 19:12:40 +01:00
Théo DELRIEU
3e15b551e0
run make pretty
2017-01-21 16:14:22 +01:00
Théo DELRIEU
07bc82d3a7
put const to the left
2017-01-21 16:14:22 +01:00
Théo DELRIEU
f1482d1f01
more tests in unit-udt
2017-01-21 16:14:22 +01:00
Théo DELRIEU
3494014ba0
new unit-udt.cpp tests
2017-01-21 16:14:22 +01:00
Théo DELRIEU
c847e0eea2
replace constructor by from/to_json: array_t
...
- tweaked a bit how `get<container<json>>` is handled
- added a from_json overload for forward list
2017-01-21 16:14:22 +01:00
Théo DELRIEU
a32de3b528
replace constructor by from/to_json: number_unsigned_t
...
This commit forces a design change in custom JSONSerializer, which might
be temporary
2017-01-21 16:14:21 +01:00
Niels Lohmann
be1d3de49b
💄 moved changes to re2c file and ran make pretty
2017-01-21 16:14:21 +01:00
Théo DELRIEU
aa2679a8ce
fix tests, avoid instantiating JSONSerializer when it will not be used
2017-01-21 16:14:21 +01:00
Théo DELRIEU
d5ee5830ed
add more tests
2017-01-21 16:14:21 +01:00
Théo DELRIEU
1c21c87e6f
use u8 prefix in unit-udt.cpp
2017-01-21 16:14:21 +01:00
Théo DELRIEU
3d405c6883
add support for enum classes
2017-01-21 16:14:21 +01:00
Théo DELRIEU
8e43d476d3
add more tests to unit-udt.cpp
2017-01-21 16:14:21 +01:00
Théo DELRIEU
1eafac7220
remove explicit keyword on udt-constructor
2017-01-21 16:14:21 +01:00
Théo Delrieu
c0c72b5b62
rewrite unit-udt: basic usage
2017-01-21 16:14:21 +01:00
Théo DELRIEU
60e6f822fa
add support for non-default-constructible udt
2017-01-21 16:14:21 +01:00
Théo DELRIEU
e5999c6c82
add a few tests
2017-01-21 16:14:21 +01:00
Théo DELRIEU
88819449c2
remove constraints on JSONSerializer instances, constrain correctly new methods
2017-01-21 16:14:21 +01:00
Théo DELRIEU
23bd2bce35
add is_compatible_* traits
2017-01-21 16:14:21 +01:00
Théo DELRIEU
178441cdfd
add basic test for custom serializer
2017-01-21 16:14:21 +01:00
Théo DELRIEU
2bc685f6b4
to_json and from_json takes both two arguments now
...
the first is the basic_json type, the second the user-defined type
2017-01-21 16:14:21 +01:00
Théo DELRIEU
837b81d672
renamed unit-constructor3.cpp to unit-udt.cpp
2017-01-21 16:14:21 +01:00