Skip to main content

json_to_expr

Function json_to_expr 

Source
pub fn json_to_expr(
    codec: CodecId,
    value: &Value,
    budget: &mut DecodeBudget,
    depth: usize,
) -> Result<Expr>
Expand description

Reads a canonical $expr-tagged serde_json::Value back into an Expr.

This is the lossless decode half of the projection, inverting expr_to_json; it enforces the decode budget and node depth so adversarial input cannot exhaust resources.