pub fn decode_no_coerce<T>(input: &str) -> Result<T, ToonError>where
T: DeserializeOwned,Expand description
Decode without type coercion (strings remain strings).
ยงExamples
use serde_json::{
json,
Value,
};
use toon_format::decode_no_coerce;
// Without coercion: quoted strings that look like numbers stay as strings
let result: Value = decode_no_coerce("value: \"123\"")?;
assert_eq!(result["value"], json!("123"));
// With default coercion: unquoted "true" becomes boolean
let result: Value = toon_format::decode_default("value: true")?;
assert_eq!(result["value"], json!(true));