I've this code (copied from here) :
struct CopyData {
string type;
string key;
@optional string description;
Json toRepresentation() const {
Json serialized = Json.emptyObject;
serialized["type"] = type;
serialized["key"] = key;
// ...
return serialized;
}
static CopyData fromRepresentation(Json json) {
CopyData data;
data.type = json["type"].get!string;
// ...
return data;
}
}
...
CopyData data = deserializeJson!CopyData(json);
...
With vibe-d
0.7.30-alpha.4 it works, with 0.7.30-rc.1 I've this error:
Deserializing composite type JsonSerializer which has no serializable fields.
../../../.dub/packages/vibe-d-0.7.30-rc.1/vibe-d/source/vibe/data/serialization.d(605,31): Error: function alyx.algorithm.common.CopyData.fromRepresentation (Json json) is not callable using argument types (JsonSerializer)
../../../.dub/packages/vibe-d-0.7.30-rc.1/vibe-d/source/vibe/data/serialization.d(287,69): Error: template instance vibe.data.serialization.deserializeValueImpl!(JsonSerializer, DefaultPolicy).deserializeValue!(CopyData) error instantiating
../../../.dub/packages/vibe-d-0.7.30-rc.1/vibe-d/source/vibe/data/serialization.d(253,61): instantiated from here: deserializeWithPolicy!(JsonSerializer, DefaultPolicy, CopyData, Json)
../../../.dub/packages/vibe-d-0.7.30-rc.1/vibe-d/source/vibe/data/json.d(1375,40): instantiated from here: deserialize!(JsonSerializer, CopyData, Json)
src/alyx/algorithm/common.d(530,53): instantiated from here: deserializeJson!(CopyData)
dmd failed with exit code 1.
I can't figure out what I'm doing wrong...