We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import vibe.d; struct Data { int a; } struct Foo { private Data m_data; this(Data data) { m_data = data; } Data toRepresentation() const { return m_data; } static Foo fromRepresentation(Data data) { return Foo(data); } } void main() { const Foo foo1 = Foo(Data(10)); Foo foo2 = foo1.serializeToJson.deserializeJson!Foo; assert(foo1 == foo2); }
It doesn't work: Serializing composite type const(Foo) which has no serializable fields
Serializing composite type const(Foo) which has no serializable fields
The text was updated successfully, but these errors were encountered:
c6e55c1
Merge pull request #879 from japplegame/patch-1
27c5038
Allows custom serializable const class/struct instances. Fixes #878
No branches or pull requests
It doesn't work:
Serializing composite type const(Foo) which has no serializable fields
The text was updated successfully, but these errors were encountered: