Explicitely ignore static members (for now)
This commit is contained in:
parent
c71a9baa54
commit
19590d30a4
|
@ -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`.
|
||||
|
|
2
TODOs.md
2
TODOs.md
|
@ -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`
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue