Registry / serialization / serde-field-with

serde-field-with

JSON →
library0.2.1rscratesunverified

Serde field with attribute

# Cargo.toml [dependencies] serde-field-with = "0.2.1"
INSTALL
IMPORT
SIG · SERDE-FIELD-WITH
S
serde-field-with
serializationrustv0.2.1
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.

SerializeWith
use serde_field_with::SerializeWith;

Use custom serialization for a field

use serde::{Serialize, Deserialize}; use serde_field_with::SerializeWith; #[derive(Serialize)] struct MyStruct { #[serde(with = "SerializeWith")] field: String, } fn main() { let s = MyStruct { field: "hello".to_string() }; println!("{}", serde_json::to_string(&s).unwrap()); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.2.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
serde-field-with — cargo add serde-field-with · libregistry