We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm trying to decode ❤🔥 (heart on fire) but njson crashes:
njson
1> Bin = <<"{\"text\":{\"body\":\"\\u2764\\u200d\\ud83d\\udd25\"}}">>. <<"{\"text\":{\"body\":\"\\u2764\\u200d\\ud83d\\udd25\"}}">> 2> json:decode(Bin). [{text,[{body,<<226,157,164,226,128,141,240,159,148,165>>}]}] 3> njson:decode(Bin). ** exception error: construction of binary failed in function njson_decoder:string_len/3 (/opt/chat_core/_build/default/lib/njson/src/njson_decoder.erl, line 165) *** segment 1 of type 'utf8': expected a non-negative integer encodable as utf8 but got: 55357 in call from njson_decoder:string/2 (/opt/chat_core/_build/default/lib/njson/src/njson_decoder.erl, line 137) in call from njson:decode/1 (/opt/chat_core/_build/default/lib/njson/src/njson.erl, line 34)
The encoding of the emoji I've used above is exactly as it comes from WhatsApp.
The text was updated successfully, but these errors were encountered:
fix: Solves issue #4. Crash when decoding some emojis.
4d6136a
Merge pull request #5 from nomasystems/fix/4-crash-when-decoding-some…
65d9f8c
…-emojis fix: Solves issue #4. Crash when decoding some emojis.
closed by #5
Sorry, something went wrong.
No branches or pull requests
I'm trying to decode ❤🔥 (heart on fire) but
njson
crashes:The encoding of the emoji I've used above is exactly as it comes from WhatsApp.
The text was updated successfully, but these errors were encountered: