Module json

Module json 

Source
Expand description

Re-export miniserde’s json module for runtime filter parsing.

Use this to parse JSON strings into values for FilterExpr::from_json().

§Example

use mik_sql::{json, FilterExpr};

let json_str = r#"{"name": {"$eq": "Alice"}}"#;
let value: miniserde::json::Value = json::from_str(json_str).unwrap();
let filter = FilterExpr::from_json(&value).unwrap();

JSON data format.

See the crate level doc for an example of serializing and deserializing JSON.

Structs§

Array
A Vec<Value> with a non-recursive drop impl.
Object
A BTreeMap<String, Value> with a non-recursive drop impl.

Enums§

Number
A JSON number represented by some Rust primitive.
Value
Any valid JSON value.

Functions§

from_str
Deserialize a JSON string into any deserializable type.
to_string
Serialize any serializable type into a JSON string.