Skip to main content

coerce_value

Function coerce_value 

Source
pub fn coerce_value(raw: &str) -> Value
Expand description

Coerce a raw string value into a typed JSON value.

  • ""Null
  • "true" / "false" (case-insensitive) → Bool
  • "null" (case-insensitive) → Null
  • Integer-looking → Number (i64)
  • Float-looking → Number (f64)
  • Everything else → String