Registry / serialization / serde-bytes-repr

serde-bytes-repr

JSON →
library0.3.0rscratesunverified

Serde adapter for controlling the representation of bytes during serialization.

# Cargo.toml [dependencies] serde-bytes-repr = "0.3.0"
INSTALL
IMPORT
SIG · SERDE-BYTES-REPR
S
serde-bytes-repr
serializationrustv0.3.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.

BytesRepr
use serde_bytes_repr::BytesRepr;

Serializes a Vec<u8> field using a custom byte representation.

use serde_bytes_repr::BytesRepr; use serde::{Serialize, Deserialize}; #[derive(Serialize, Deserialize)] struct Data { #[serde(with = "BytesRepr")] bytes: Vec<u8>, } let data = Data { bytes: vec![0, 1, 2] }; let json = serde_json::to_string(&data).unwrap(); println!("Serialized: {}", json);
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.3.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
3 hits · last 30 days
node
2
Resources
serde-bytes-repr — cargo add serde-bytes-repr · libregistry