|10:28||• Fixed ticket [ad2559db]: JSON does not properly escape control characters plus 5 other changes (artifact: 0134f388 user: drh)|
|10:28||Escape control characters in JSON. Fix for ticket [ad2559db380abf8]. (check-in: 4f1b5229 user: drh tags: trunk)|
|10:14||• New ticket [ad2559db] JSON does not properly escape control characters. (artifact: 9f98f001 user: drh)|
|Title:||JSON does not properly escape control characters|
|Last Modified:||2016-02-04 10:28:59|
|Version Found In:||3.10.2|
drh added on 2016-02-04 10:14:04:
The JSON specification requires control characters in strings to be escaped, but the JSON1 extension does not do this. For example:
The output should be ["\u0001\b\t\n\f\r\u001f"] but the JSON1 extension leaves the characters unescaped.
This error arose because when I was coding up the JSON1 extension I missed the part in the JSON specification that says that control characters must be escaped. I understood the escapes to be optional for all characters other than " and \.