I am designing a system for serializing in-memory objects to a number of formats (i.e. json, protocol buffers, etc). In order to do so I use a two-step proces: first I define methods for every class I want to serialize to convert it to an more simple, serializable object, i.e. an object with a simple tree structure and no memory references. In the second step I define a schema for converting these simple serializable objects to e.g. json, xml or protocol buffers.
I was wondering if there is any CS terminology for what I am doing? I assume the second step is called serialization or encoding, but what is the first step called? I.e. converting an object to another object for the purpose of making it serializable? Is this Marshalling?