Vibe.d - Custom serialization policy

Flying-Toast email at example.org
Wed Jun 26 18:54:05 UTC 2019


I am using vibe.d's serialization feature for a few classes.

I have found that immutable/const fields are not serialized, 
though it turns out this is intentional [1].

In the GitHub issue [1], Sönke mentioned that a solution to this 
would be to use a custom `Policy`. I tried to find documentation 
on vibe's serialization policies, but I couldn't find any.

Could anyone point me to some documentation for serialization 
policies, or explain how to create a policy that allows 
serializing immutable fields (and how to use it with the Json 
serializer)?

[1](https://github.com/vibe-d/vibe.d/issues/1536)

Thanks!


More information about the Digitalmars-d mailing list