Add parse_json.
This commit is contained in:
@@ -276,6 +276,11 @@ fn test_map_json() -> Result<(), Box<EvalAltResult>> {
|
||||
EvalAltResult::ErrorMismatchOutputType(..)
|
||||
));
|
||||
|
||||
assert!(matches!(
|
||||
*engine.parse_json("{a:42}", true).expect_err("should error"),
|
||||
EvalAltResult::ErrorParsing(..)
|
||||
));
|
||||
|
||||
assert!(matches!(
|
||||
*engine
|
||||
.parse_json("#{a:123}", true)
|
||||
|
Reference in New Issue
Block a user