Problem
When we deserialize the EDS we hardcode the default tree. This is problematic because computed Row and Col roots of the deserialized eds will be utterly different if another custom tree is used.
Solutions
- Have a global tree constructor var/registry that
UnmarshalJSON would use instead
- Users would then register their trees by name
- The name would be serialized in the json and deserialization would then get the proper tree by the name
- This is exactly what happens with the codec.
UnmarshalEDS func that accepts the tree.
Problem
When we deserialize the EDS we hardcode the default tree. This is problematic because computed Row and Col roots of the deserialized eds will be utterly different if another custom tree is used.
Solutions
UnmarshalJSONwould use insteadUnmarshalEDSfunc that accepts the tree.