| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| any.h | ||
| future.h | ||
| io.h | ||
| network.h | ||
| optional.h | ||
| protocol.h | ||
| serialization.h | ||
| session.h | ||
| typeinfo.h | ||
| typeof.h | ||
| types.h | ||
| variant.h |
Empty structs were being serialized as `null`, when they should have been serialized as `{}`.
This was due to the type inference on the serializer - where no calls to `field()` would result in the default `null` type.
To solve this, the `serialize(const void* object, const std::initializer_list<Field>&)` inline helper has been promoted to a virtual function (and renamed to `fields()`).
The JSON serializer implementation of this now first sets the object type to `object`, even if there are no fields to serialize.
Added test for this.
Fixes: #10
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| any.h | Loading commit data... | |
| future.h | Loading commit data... | |
| io.h | Loading commit data... | |
| network.h | Loading commit data... | |
| optional.h | Loading commit data... | |
| protocol.h | Loading commit data... | |
| serialization.h | Loading commit data... | |
| session.h | Loading commit data... | |
| typeinfo.h | Loading commit data... | |
| typeof.h | Loading commit data... | |
| types.h | Loading commit data... | |
| variant.h | Loading commit data... |