Turns out that self.content_address.to_string() is just the name of the enum variant (SchemaVariant, InputSocket, etc.) and doesn't actually include any of the hash itself.
The uses of self.content_address inside of serde_json::json![...] are technically fine, since serde_json will basically output a form of the debug output of the enum, but it's such an easy thing to forget that serde_json has special handling that it felt like we should avoid using it directly for the node_hash in general.
Turns out that
self.content_address.to_string()
is just the name of the enum variant (SchemaVariant
,InputSocket
, etc.) and doesn't actually include any of the hash itself.The uses of
self.content_address
inside ofserde_json::json![...]
are technically fine, sinceserde_json
will basically output a form of the debug output of the enum, but it's such an easy thing to forget thatserde_json
has special handling that it felt like we should avoid using it directly for thenode_hash
in general.