Reviewers: golang-dev1,
Message:
Hello
golan...@googlegroups.com (cc:
golan...@googlegroups.com),
I'd like you to review this change to
https://code.google.com/p/go/
Description:
encoding/json: document that marshaling invalid utf-8 sequence will
return error
Fixes issue 5360.
Please review this at
https://codereview.appspot.com/8926046/
Affected files:
M src/pkg/encoding/json/encode.go
Index: src/pkg/encoding/json/encode.go
===================================================================
--- a/src/pkg/encoding/json/encode.go
+++ b/src/pkg/encoding/json/encode.go
@@ -39,8 +39,8 @@
//
// Floating point, integer, and Number values encode as JSON numbers.
//
-// String values encode as JSON strings, with each invalid UTF-8 sequence
-// replaced by the encoding of the Unicode replacement character U+FFFD.
+// String values encode as JSON strings, InvalidUTF8Error will be returned
+// if invalid UTF-8 sequence is encountered.
// The angle brackets "<" and ">" are escaped to "\u003c" and "\u003e"
// to keep some browsers from misinterpreting JSON output as HTML.
//