Registry / serialization / serde-json-wasm

serde-json-wasm

JSON →
library1.0.1rscratesunverified

A serde_json-compatible JSON serializer/deserializer optimized for WebAssembly with deterministic output and no floating-point support.

# Cargo.toml [dependencies] serde-json-wasm = "1.0.1"
INSTALL
IMPORT
SIG · SERDE-JSON-WASM
S
serde-json-wasm
serializationrustv1.0.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.

to_string
use serde_json_wasm::to_string;

Serialize a struct to JSON string.

use serde_json_wasm::to_string; use serde::Serialize; #[derive(Serialize)] struct Data { x: u32 } fn main() -> Result<(), Box<dyn std::error::Error>> { let data = Data { x: 42 }; let json = to_string(&data)?; println!("{}", json); Ok(()) }
Debug
Known issues
gotchaFloating-point numbers are not supported; serialization will fail if your types contain f32/f64.
fix
Use integer or string representations for floating-point values.
affects: >=1.0.0
Upgrade
Version history
1.0.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
serde-json-wasm — cargo add serde-json-wasm · libregistry