Module conjure_serde::json
source · Expand description
JSON serialization support.
Conjure specifies behavior that differs from serde_json’s in a couple of ways:
- serde_json serializes non-finite floating point values as
null
, while Conjure specifies"Infinity"
,"-Infinity"
, and"NaN"
as appropriate. - serde_json serializes byte sequences as arrays of numbers, while Conjure specifies Base64-encoded strings.
- serde_json does not support binary, floating point, or boolean keys, while Conjure does.
Additionally, Conjure clients should ignore unknown fields while Conjure servers should trigger errors.
This module provides Serializer
and Deserializer
implementations which wrap serde_json’s and handle these
special behaviors.
Structs§
- A serde JSON deserializer appropriate for use by Conjure clients.
- A serde JSON serializer compatible with the Conjure specification.
- A serde JSON deserializer appropriate for use by Conjure servers.
Functions§
- Deserializes a value from a reader of JSON data.
- Deserializes a value from a slice of JSON data.
- Deserializes a value from a string of JSON data.
- Deserializes a value from a reader of JSON data.
- Deserializes a value from a slice of JSON data.
- Deserializes a value from a string of JSON data.
- Serializes a value as JSON into a string.
- Serializes a value as JSON into a byte buffer.
- Serializes a value as JSON into a writer.