Registry / serialization / serde-macros

serde-macros

JSON →
library0.8.9rscratesunverified

Macros to auto-generate implementations for the serde framework.

# Cargo.toml [dependencies] serde_macros = "0.8.9"
INSTALL
IMPORT
SIG · SERDE-MACROS
S
serde-macros
serializationrustv0.8.9
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Serialize
use serde_macros::Serialize;

Derives Serialize for a struct and serializes it to JSON.

use serde_macros::Serialize; #[derive(Serialize)] struct Point { x: i32, y: i32, } let point = Point { x: 1, y: 2 }; let json = serde_json::to_string(&point).unwrap(); println!("{}", json);
Debug
Known issues
breakingThis crate is deprecated in favor of serde's built-in derive macros.
fix
Use serde::{Serialize, Deserialize} instead.
affects: >=0.9.0
Upgrade
Version history
0.8.9latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
12
Resources
serde-macros — cargo add serde-macros · libregistry