Registry / serialization / serde-this-or-that

serde-this-or-that

JSON →
library0.5.0rscratesunverified

Custom deserialization for fields that can be specified as multiple types.

# Cargo.toml [dependencies] serde-this-or-that = "0.5.0"
INSTALL
IMPORT
SIG · SERDE-THIS-OR-THAT
S
serde-this-or-that
serializationrustv0.5.0
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.

ThisOrThat
use serde_this_or_that::ThisOrThat;

Deserialize a field that can be either a string or a number.

use serde_this_or_that::ThisOrThat; #[derive(serde::Deserialize)] struct Config { #[serde(with = "ThisOrThat")] value: String, }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.5.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
serde-this-or-that — cargo add serde-this-or-that · libregistry