Support to tree serialization