-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot parse new ()
encoding
#27
Comments
@webmaster128 looks like using |
Right, deserializing into I wonder where you need this. For contract -> VM communication (like ContractResult) we use serde-json-wasm for serializing and serde-json for deserializing. |
It shows up in the unit tests: https://github.com/CosmWasm/cosmwasm/blob/bcd465b3e1307c21a7d23ac5d9f67908301df71b/contracts/ibc-reflect/src/contract.rs#L398-L404 It is not blocking the PR, but one step of the unit test is disabled. I guess I could directly use |
Ahh, okay! Good to know this is used. Not implemented: /// Unsupported. Use a more specific deserialize_* method
fn deserialize_unit<V>(self, _visitor: V) -> Result<V::Value>
where
V: Visitor<'de>,
{
unreachable!()
} |
As of #24 we now support encoding
()
, such as inContractResult<()>
In my tests,
ContractResult::Ok(())
will encode to{"ok":null}
properly. However, when I try to deserialize it, I get an error:Error:
Note: Tested with
v0.2.2
The text was updated successfully, but these errors were encountered: