Module holochain_json_api::json [−][src]
The JsonString type is defined here. It is used throughout Holochain to enforce a standardized serialization of data to/from json.
Structs
JsonString | track json serialization with the rust type system!
JsonString wraps a string containing JSON serialized data
avoid accidental double-serialization or forgetting to serialize
serialize any type consistently including hard-to-reach places like Option |
JsonStringOption | |
RawString | generic type to facilitate Jsonifying values directly JsonString simply wraps String and str as-is but will Jsonify RawString("foo") as ""foo"" RawString must not implement Serialize because it should always convert to JsonString with from RawString can implement Deserialize because JsonString uses default serde to step down |
Traits
DefaultJson |
Functions
default_to_json | if all you want to do is implement the default behaviour then use #[derive(DefaultJson)]
should only be used with From |
default_try_from_json | if all you want to do is implement the default behaviour then use #[derive(DefaultJson)]
standard boilerplate should include JsonError as the Error:
impl TryFrom |