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

Newline etc, escaping bug. #35

Closed
dwarring opened this issue Jan 3, 2018 · 4 comments
Closed

Newline etc, escaping bug. #35

dwarring opened this issue Jan 3, 2018 · 4 comments

Comments

@dwarring
Copy link

dwarring commented Jan 3, 2018

% perl6 -v
This is Rakudo version 2017.12-88-g8fd776fd7 built on MoarVM version 2017.12-15-g8414888b implementing Perl 6.c.
% perl6 -I ../json_fast/lib/ -MJSON::Fast -e'say from-json(q<"AB\nC">).perl'
"AB\nC"
% perl6 -I ../json_fast/lib/ -MJSON::Fast -e'say from-json(q<"AB\nC\u000A">).perl'
"ABnC\n"

Note the decoding of \n as n, but only if '\nand \u000A` are used together in a string.

New regression in JSON::Fast 0.9.9.

@m-dango
Copy link

m-dango commented Feb 15, 2018

It's looking like any use of \u and \n together in the same string is breaking newlines in 0.9.9

$ perl6 -e 'use JSON::Fast:ver<0.9.8>; dd from-json(‘{"test":"\n backslash u: \u2605 \n","test2":"\n no backslash u: ★ \n"}’)'
${:test("\n backslash u: ★ \n"), :test2("\n no backslash u: ★ \n")}

$ perl6 -e 'use JSON::Fast:ver<0.9.9>; dd from-json(‘{"test":"\n backslash u: \u2605 \n","test2":"\n no backslash u: ★ \n"}’)'
${:test("n backslash u: ★ n"), :test2("\n no backslash u: ★ \n")}

@zoffixznet
Copy link
Contributor

Possibly related to #36

@timo
Copy link
Owner

timo commented Feb 23, 2018

i believe i fixed this in release 0.9.10; please try it on your real-life datasets

@dwarring
Copy link
Author

Now working. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants