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

Gojay's decode_bool.go doesn't handle CRLF correctly #131

Open
sgotliv opened this issue Sep 29, 2019 · 0 comments
Open

Gojay's decode_bool.go doesn't handle CRLF correctly #131

sgotliv opened this issue Sep 29, 2019 · 0 comments

Comments

@sgotliv
Copy link

sgotliv commented Sep 29, 2019

It seems that methods assertTrue() and assertFalse() in decode_bool.go [1] do not recognize "\r" (CR) as a legitimate separator so gojay fails to parse json which boolean argument in the last line with trailing CRLF.

{
....
"status": true
}

Replacing "\r\n" with just "\n" or completely removing "\r\n" make it work because both "\n" and "}" appear in a list of valid separators.

[1] https://github.com/francoispqt/gojay/blob/master/decode_bool.go#L117

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

1 participant