Skip to content

Opt In Serialization

jacobdufault edited this page Jul 14, 2014 · 1 revision

Being explicit can lead to a more maintainable serialization model. Full Serializer allows you to change the default member serialization logic so that it is opt-in. For example,

[fsObject(MemberSerialization = fsMemberSerialization.OptIn)]
public class Model {
    public int NonSerialized;

    [fsProperty]
    public int Serialized;
}

When Model is serialized, NonSerialized will not be persisted because it does not have a [fsProperty] or [SerializeField] annotation.

Clone this wiki locally