Crate features / serde_json
Feature flags · serde_json 1.0.154 · from crates.io 2026-10-24
serde_json features: what each one does, and the line to copy
Short answerserde_json 1.0.154 has 7 features. By default it turns on std; add default-features = false to start from nothing. It needs Rust 1.71 or newer.
Pick features
Every feature
| Feature | In default | Turns on |
|---|---|---|
alloc | serde_core/alloc | |
arbitrary_precision | nothing else (a switch the code checks) | |
float_roundtrip | nothing else (a switch the code checks) | |
preserve_order | indexmap, alloc, dep:foldhash | |
raw_value | nothing else (a switch the code checks) | |
std | yes | memchr/std, serde_core/std |
unbounded_depth | nothing else (a switch the code checks) |
dep:x turns on the optional dependency x; x/y turns on feature y of dependency x (with ?, only if x is already on).
MSRV history
The minimum Rust version serde_json declares (rust-version), and the release that changed it:
- 1.0.69 (2021-11-05): Rust 1.31
- 1.0.73 (2021-12-13): Rust 1.36
- 1.0.101 (2023-07-11): Rust 1.56
- 1.0.144 (2025-09-13): Rust 1.61
- 1.0.146 (2025-12-22): Rust 1.68
- 1.0.150 (2026-05-21): Rust 1.71
Stuck on an older compiler? Pin the last version that supports it, for example cargo update -p serde_json --precise <version>, or use resolver 3, which picks compatible versions for you.
More on serde_json
docs.rs feature list · crates.io · license MIT OR Apache-2.0 · edition 2021
Up next
Next crateFeature flags for every popular crateRead it next →Also worth your time
Did this answer your question?