Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix u style unicode strings in python #110

Merged
merged 2 commits into from
May 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix test
  • Loading branch information
samuelcolvin committed May 29, 2024
commit eb0e123c356a9b29ca86272bc54dca51d8b46e38
6 changes: 3 additions & 3 deletions crates/jiter/tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1597,9 +1597,9 @@ fn jiter_partial_string() {

#[test]
fn test_unicode_roundtrip() {
// '"中文"' or b'"\\u4e2d\\u6587"'
let json_bytes: Vec<u8> = vec![34, 92, 117, 52, 101, 50, 100, 92, 117, 54, 53, 56, 55, 34];
let value = JsonValue::parse(&json_bytes, false).unwrap();
// '"中文"'
let json_bytes = b"\"\\u4e2d\\u6587\"";
let value = JsonValue::parse(json_bytes, false).unwrap();
let cow = match value {
JsonValue::Str(s) => s,
_ => panic!("expected string"),
Expand Down
Loading