Add JSON5 deserialization
This commit is contained in:
@ -34,3 +34,23 @@ fn ron_to_json() {
|
||||
|
||||
assert_eq!(control, out);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn json5_read_json() {
|
||||
let opt = Opt {
|
||||
input: Input::Json5,
|
||||
output: Output::Json,
|
||||
pretty: true,
|
||||
no_newline: false,
|
||||
};
|
||||
|
||||
let input = example_to_vec("examples/materials.json");
|
||||
|
||||
let mut output = vec![];
|
||||
transcode(opt, &mut input.as_slice(), &mut output);
|
||||
let out = String::from_utf8(output).unwrap();
|
||||
|
||||
let control = example_to_string("examples/materials.json");
|
||||
|
||||
assert_eq!(control, out);
|
||||
}
|
||||
|
Reference in New Issue
Block a user