You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, with the Rust SDK (and standards implementation by extension), we allow deserializing parameters as a map with named keys OR as an array of ordered values through serde/serde-json.
The ambiguity of deserialization isn't an issue since the parameters aren't canonical anyway since we are stuck with JSON (unless we start asserting ordering of named parameters of maps and disallow whitespace). The latter option is much more concise, reducing costs and quicker debugging, but we need to be clear if and how this is allowed in specs.
The options for deserialization seem to be:
Only specify that named parameters are required to be supported, disallow any other format
..., allow any other format up to the implementation to support (seems this is currently the case)
Document the optional sequence format
Require implementations to accept either format for parameters
cc @jlogelin
The text was updated successfully, but these errors were encountered:
Currently, with the Rust SDK (and standards implementation by extension), we allow deserializing parameters as a map with named keys OR as an array of ordered values through serde/serde-json.
For example, take the nft spec interface:
The parameters for calling this function will either be:
OR
The ambiguity of deserialization isn't an issue since the parameters aren't canonical anyway since we are stuck with JSON (unless we start asserting ordering of named parameters of maps and disallow whitespace). The latter option is much more concise, reducing costs and quicker debugging, but we need to be clear if and how this is allowed in specs.
The options for deserialization seem to be:
cc @jlogelin
The text was updated successfully, but these errors were encountered: