• Andrew Dunstan's avatar
    Do not escape a unicode sequence when escaping JSON text. · 0ad1a816
    Andrew Dunstan authored
    Previously, any backslash in text being escaped for JSON was doubled so
    that the result was still valid JSON. However, this led to some perverse
    results in the case of Unicode sequences, These are now detected and the
    initial backslash is no longer escaped. All other backslashes are
    still escaped. No validity check is performed, all that is looked for is
    \uXXXX where X is a hexidecimal digit.
    
    This is a change from the 9.2 and 9.3 behaviour as noted in the Release
    notes.
    
    Per complaint from Teodor Sigaev.
    0ad1a816
json_1.out 35 KB