You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an following issue while reading some JSON from disk, loading it into a serde_json::Value, and trying to create a minijinja context out of it:
let value: serde_json::Value = serde_json::from_str("{\"x\": 42}").unwrap();
println!("value = {}", value.to_string());
let string = serde_json::ser::to_string(&value).unwrap();
println!("string = {}", string);
let context = minijinja::Value::from_serialize(value);
println!("context = {}", context);
I would expect the minijinja::Value to just contain 42 again. If I read the JSON as a specific rust struct, everything works, since in that case the arbitrary-precision number is not used.
Am I holding it wrong, is this expected behavior, or is it a bug?
The text was updated successfully, but these errors were encountered:
I encountered an following issue while reading some JSON from disk, loading it into a
serde_json::Value
, and trying to create a minijinja context out of it:This gives the following output:
I would expect the
minijinja::Value
to just contain42
again. If I read the JSON as a specific rust struct, everything works, since in that case the arbitrary-precision number is not used.Am I holding it wrong, is this expected behavior, or is it a bug?
The text was updated successfully, but these errors were encountered: