Custom Element Serialization [Writable] (advanced)

Last Updated: 03/28/2018 Introduced in Version: 2.0
In addition to marking up the object with attributes, there are a few interfaces that allow for customization of the storage and hooking events around the storage.
 
1. Specifying Custom Serialization
    
Using this interface, logic can be run on what to store, do conversion and construction of unstable objects

2. Specifying Behavior Before Read
 
Object can know they are being read in and it can behave differently.  For example, if you do not want to take some action when being read (deserialized) that might be appropriate after.

3. Specifying Behavior Before Write
 
Objects can know they are about to be written.  This is often used to rearrange data before the write happens.

4. Specifying Behavior After Read
 
If some action needs to take place after an object (full object graph) has been read, this interface allows this to be changed.

5. Changing Fault Behavior
 
If different behavior is desired when there is a problem, this interface allows adjustment.

Example:

 

Additional Resources