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
Using json 1.4.3, Ruby 1.8.7p174 and 1.9.2-preview1.
When given a high surrogate with no low surrogate, it gives nil for the string:
nil
JSON.parse(%q{[123,"x\uD834x"]} # => [123, nil]
When given a low surrogate with no high surrogate, it treats it as a valid character:
JSON.parse %q{[123,"x\uDD5Ex"]} # => [123, "x\355\265\236x"]
In both cases, json/pure throws JSON::GeneratorErrors due to iconv's strictness (IllegalSequence on OS X, InvalidCharacter on Linux).
json/pure
JSON::GeneratorError
IllegalSequence
InvalidCharacter
The text was updated successfully, but these errors were encountered:
Ruby 1.x is EOL at 2020.
Sorry, something went wrong.
No branches or pull requests
Using json 1.4.3, Ruby 1.8.7p174 and 1.9.2-preview1.
When given a high surrogate with no low surrogate, it gives
nil
for the string:When given a low surrogate with no high surrogate, it treats it as a valid character:
In both cases,
json/pure
throwsJSON::GeneratorError
s due to iconv's strictness (IllegalSequence
on OS X,InvalidCharacter
on Linux).The text was updated successfully, but these errors were encountered: