1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! JSON parsing shim — conditionally backed by `serde_json` (default) or
//! `simd-json` (when the `simd_json` feature flag is enabled).
//!
//! # Usage
//! ```ignore
//! use crate::json;
//! let value: MyType = json::from_str(&text)?;
//! ```
//!
//! The feature flag is purely an implementation detail; callers always use the
//! same `json::from_str` / `json::to_string` API surface regardless of which
//! backend is active.
//!
//! # SIMD requirements
//! `simd-json` requires a CPU with AVX2 support (most x86-64 chips from 2013
//! onward). On unsupported hardware the crate falls back automatically to a
//! scalar path.
// ── serde_json backend (default) ─────────────────────────────────────────────
pub use ;
// ── simd-json backend ─────────────────────────────────────────────────────────
pub use ;
/// Deserialize `T` from a JSON string.
///
/// When the `simd_json` feature is enabled this uses `simd_json::from_slice`
/// (which mutates a temporary byte buffer for in-place parsing). Otherwise
/// delegates to `serde_json::from_str`.