Skip to main content

json

Attribute Macro json 

Source
#[json]
Expand description

Derives decoding/encoding on nongeneric structs; encode/try_encode also accept generics. seq, nested accepts &Owner: IntoIterator of owned/borrowed encoders; decoding requires Vec<T>. Exact writes are checked independently of sizing, even if the owner changes between traversals. Derives JSON decoding and encoding for structs declared at module scope. Decoding requires nongeneric structs; encode and try_encode also support generics. Type and const arguments cannot contain macros, local bindings, or item declarations.