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
In accordance with RFC 8258 § 7, the non-BMP character 𝄞 (U+1D11E) should be escaped as the escaped surrogate pair \uD834\uDD1E. Therefore, I expect the following Rust code to compile and run successfully:
use jsonc_parser::JsonValue;use jsonc_parser::parse_to_value;fnmain(){let src = r#""\uD834\uDD1E""#;let v = parse_to_value(src,&Default::default()).unwrap().unwrap();ifletJsonValue::String(s) = v {assert_eq!("\u{1D11E}", s)}else{panic!();}}
However, on the latest version of jsonc-parser (as of writing, this is version 0.21.0), this code panics at the unwrap on line 6 with the message "Invalid unicode escape sequence. 'D834' is not a valid UTF8 character".
The text was updated successfully, but these errors were encountered:
Ron has adopted it in their v0.9 release instead of base64 for properly supporting roundtripping with byte strings. serde_json didn't have the issue though.
In accordance with RFC 8258 § 7, the non-BMP character
𝄞
(U+1D11E) should be escaped as the escaped surrogate pair\uD834\uDD1E
. Therefore, I expect the following Rust code to compile and run successfully:However, on the latest version of
jsonc-parser
(as of writing, this is version 0.21.0), this code panics at theunwrap
on line 6 with the message"Invalid unicode escape sequence. 'D834' is not a valid UTF8 character"
.The text was updated successfully, but these errors were encountered: