Default value for a field: Some examples of the
Handwritten generic type bounds: Some unusual scenarios in
which Serde codegen infers the wrong generic type bounds. The impl bounds can be
replaced with handwritten ones using the
Deserialize for custom map type: Detailed explanation of each step involved in deserializing a map.
Serialize for custom map type: Other complex types (sequences, structs, tuple structs) are very similar to this as well.
Array of values without buffering: Deserialize the maximum value of an array of integers without holding the whole array in memory at once. This approach can be adapted to handle a variety of other situations in which data needs to be processed while being deserialized instead of after.
Serialize enum as number: A macro to impl
Deserialize for a C-like enum in a way that represents it as a
all data formats.
Serialize fields as camelCase: One common application of
Skip serializing field: Some examples of the
De/Serialize for other crate: Implementing
Deserialize for a type in a different crate by wrapping it in a newtype
Manually deserialize struct: The long form of the
Deserialize impl generated by codegen for a simple struct.