]> Cypherpunks repositories - gostls13.git/commit
encoding/json: coerce invalid UTF-8 to valid UTF-8 during Marshal
authorRuss Cox <rsc@golang.org>
Fri, 12 Jul 2013 21:37:10 +0000 (17:37 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 12 Jul 2013 21:37:10 +0000 (17:37 -0400)
commit64054a40ad0d85e82f77a4982ea4ee08c3cea40a
tree99a02e5232b25e553ab94b655526b68f19da2f1a
parentcfefe6a7633abc8964166720769df60e56a50583
encoding/json: coerce invalid UTF-8 to valid UTF-8 during Marshal

In practice, rejecting an entire structure due to a single invalid byte
in a string is just too picky, and too hard to track down.
Be consistent with the bulk of the standard library by converting
invalid UTF-8 into UTF-8 with replacement runes.

R=golang-dev, crawshaw
CC=golang-dev
https://golang.org/cl/11211045
doc/go1.2.txt
src/pkg/encoding/json/decode_test.go
src/pkg/encoding/json/encode.go