Add serialize method

This method can serialize an object that has been under observer.
It can serialize dependent oberver