Closed GoogleCodeExporter closed 9 years ago
Appendix E of "JavaScript: The Good Parts" said that:
"JSON allows the / character to be escaped so that JSON can be embedded in HTML
<script> tags. HTML does not allow the sequence </ except to start the
</script> tag.
JSON allows <\/, which produces the same result but does not confuse HTML."
The solidum characters are escaped in other popular scripting languages (e.g.,
PHP).
So I think gson should consider it seriously.
Original comment by william....@gmail.com
on 29 Oct 2008 at 10:17
I agree this is a good idea. I have fixed this in r279 and also added a test.
We will
include it in our next release.
Original comment by inder123
on 29 Oct 2008 at 11:32
Original issue reported on code.google.com by
james.re...@gmail.com
on 22 Oct 2008 at 4:02