Fix bug in json prettyprint

    Fixes #5889
    Double quote was erroneously treated as escaped if preceded by
    escaped backslash sequence