implement serialization/deserialization based on the new data tree (DataStruct)