Explicitely ignore static members (for now)

This commit is contained in:
Martchus 2017-11-13 16:29:23 +01:00
parent c71a9baa54
commit 19590d30a4
3 changed files with 8 additions and 0 deletions

View File

@ -203,6 +203,10 @@ An example for such custom (de)serialization can be found in the file
`json/reflector-chronoutilities.h`. It provides (de)serialization of `DateTime` and
`TimeSpan` objects from the C++ utilities library.
### Remarks
* Static member variables are currently ignored by the generator.
* It is currently not possible to ignore a specific member.
### Further examples
Checkout the test cases for further examples. Relevant files are in
the directories `lib/tests` and `generator/tests`.

View File

@ -14,6 +14,8 @@
explicitely
- [x] Fix traits currently relying on `JsonSerializable` being base class
- [x] Allow exporting symbols
- [ ] Allow (de)serialization of static members (by default?)
- [ ] Allow ignoring particular members
## Library-only
- [x] Support `std::unique_ptr` and `std::shared_ptr`

View File

@ -23,6 +23,8 @@ struct TestStruct : public JsonSerializable<TestStruct> {
int someInt = 0;
string someString = "foo";
string yetAnotherString = "bar";
static constexpr const char *staticMember = "static members are just ignored";
static int anotherStaticMember;
private:
string privateString = "not going to be serialized";