Skip to main content

project_json_to_expr

Function project_json_to_expr 

Source
pub fn project_json_to_expr(value: &Value, mode: JsonProjectionMode) -> Expr
Expand description

Projects a serde_json::Value to an Expr using the given mode.

JsonProjectionMode::TaggedCanonical requires $expr-tagged input and is fallible at the codec layer; this infallible entry point is only defined for the lossy projections. For tagged canonical decoding use crate::json_to_expr directly (it threads a decode budget and returns a Result).

Both JsonProjectionMode::UntaggedInterop and JsonProjectionMode::TextLossy decode plain JSON via the untagged projection.