mirror of
https://github.com/golang/go.git
synced 2025-11-08 12:41:02 +00:00
encoding/json: document angle bracket escaping.
Fixes #2643. R=rsc, d_smithson CC=golang-dev https://golang.org/cl/5543068
This commit is contained in:
parent
a5a16eeaab
commit
6e285ebade
1 changed files with 2 additions and 0 deletions
|
|
@ -39,6 +39,8 @@ import (
|
|||
//
|
||||
// String values encode as JSON strings, with each invalid UTF-8 sequence
|
||||
// replaced by the encoding of the Unicode replacement character U+FFFD.
|
||||
// The angle brackets "<" and ">" are escaped to "\u003c" and "\u003e"
|
||||
// to keep some browsers from misinterpreting JSON output as HTML.
|
||||
//
|
||||
// Array and slice values encode as JSON arrays, except that
|
||||
// []byte encodes as a base64-encoded string.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue