You will have to override the serialization method in the extended class, and in this method implement the logic you want. As for the fields, maybe you could create a new instance of the child and assign only the desired fields/values and ignore the base class.
I hope I've helped