Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Add support for unicode escape sequences in fromJSON #3305
As fromTOML supports unicode escape sequences, bring fromJSON on par. JSON defaults
Add a test to verify correct parsing, using all escape sequences from json.org.
Caught by @basvandijk while debugging Hydra issue, where JSON strings coming from GitHub contained
As fromTOML supports \u and \U escapes, bring fromJSON on par. As JSON defaults to UTF-8 encoding (every JSON parser must support UTF-8), this change parses the `\u hex hex hex hex` sequence (\u followed by 4 hexadecimal digits) into an UTF-8 representation. Add a test to verify correct parsing, using all escape sequences from json.org.