Skip to main content

NsonSerialize

Derive Macro NsonSerialize 

Source
#[derive(NsonSerialize)]
{
    // Attributes available to this derive:
    #[njson]
    #[nextjson]
}
Expand description

Derive NextJson’s native serialization contract and compile-time schema.

Configuration is accepted through #[njson(...)]. The generated implementation writes directly through NsonSerialize::nextencode and exposes NsonSchema::SCHEMA without depending on another macro framework.