Registry / serialization / serde-big-array

serde-big-array

JSON →
library0.5.1rscratesunverified

Helper for serializing and deserializing arrays larger than 32 elements with serde.

# Cargo.toml [dependencies] serde-big-array = "0.5.1"
INSTALL
IMPORT
SIG · SERDE-BIG-ARRAY
S
serde-big-array
serializationrustv0.5.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.

big_array
✓ use serde_big_array::big_array;

Defines a big array type and uses it in a struct for serde serialization.

use serde::{Serialize, Deserialize}; use serde_big_array::big_array; big_array! { BigArray; 128 } #[derive(Serialize, Deserialize)] struct S { #[serde(with = "BigArray")] arr: [u8; 128], } fn main() { let s = S { arr: [0; 128] }; println!("{}", serde_json::to_string(&s).unwrap()); }
Debug
Known issues
gotchaThe `big_array!` macro must be called at crate root or module level, not inside functions.
fix
Place the macro invocation at the top level of your module or crate.
affects: >=0.1.0
Upgrade
Version history
0.5.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
14
Resources
serde-big-array — cargo add serde-big-array · libregistry