Commit Graph

21 Commits

Author SHA1 Message Date
Martchus 30735ba187 Fix warnings 2021-03-20 21:25:56 +01:00
Martchus 450588af89 Support multimap and unordered_multimap
The previously (undocumented) implementation used non-unique
keys in JSON objects. This is not strictly forbidden by the
RFC but not recommended. Multiple values are now stored within
an array instead.
2019-12-27 01:40:34 +01:00
Martchus 1024b8e391 Use override in test fixtures 2019-11-03 22:33:29 +01:00
Martchus c3dc381425 Support `std::variant` 2019-11-03 22:02:56 +01:00
Martchus 8cac133104 Adapt to changes in c++utilities 2019-06-10 22:46:06 +02:00
Martchus 316c1ba838 Add library for basic binary (de)serialization 2018-06-23 14:35:43 +02:00
Martchus 03e3a4bc67 Support std::(unordered_)?(multi)?set 2018-02-26 22:39:09 +01:00
Martchus ec66f14e4c Just use IsNumber() to check for numbers
Otherwise deserializing doubles does not work
when there's no explicit decimal point in the
JSON file.
2017-12-22 20:44:04 +01:00
Martchus 86a577748e Allow direct serialization of iteratables 2017-11-18 00:28:24 +01:00
Martchus a7f587cb84 Support std::map and std::unordered_map 2017-11-13 20:16:43 +01:00
Martchus f24390a00b Support smart pointer 2017-11-12 23:18:01 +01:00
Martchus daf1a8602c Rename Reflector -> JsonReflector
So helper methods for other applications of reflections
would go into a separate namespace to prevent conflicts.
2017-11-02 23:35:56 +01:00
Martchus 407de04d91 Allow deserializing tuples 2017-10-29 22:53:02 +01:00
Martchus d849144504 Allow serializing tuples 2017-10-29 22:14:04 +01:00
Martchus ae3d8030b6 Allow serializing enums
Note that deserializing is not so simple because
we would need to check whether the integer actually
is an item of the expected enumeration type.
2017-10-29 21:31:23 +01:00
Martchus 0520341411 Fix passing temporary to Reflector::push() 2017-10-28 18:29:15 +02:00
Martchus 104e362762 Imporve documentation and build script 2017-10-28 18:24:12 +02:00
Martchus c94c896f6c Refactor RapidJSON wrapper
* Move all JSON related files into own directory
* Move helper for error handling in own header
* Remove some leftovers from debugging
* Rename classes, use Json instead of JSON
2017-10-28 16:23:39 +02:00
Martchus ad03afb1f2 Keep track of errors and fix usage of Boost.Hana
* Optionally save errors which occur during deserialization
  to allow error handling
* Don't operate on copies when using Boost.Hana
2017-10-28 15:50:16 +02:00
Martchus 1b1d07ef8c Improve error handling
* Throw ParseResult when parsing error occurs
* Silence type mismatch or missing members for now
2017-10-27 20:59:08 +02:00
Martchus 4a8ebc99a3 Rename Reflectable -> JSONSerializable
This allows to provide multiple independently
functional reflection features by simply using
different base classes for them.
2017-10-23 00:41:10 +02:00