mirror of
https://github.com/golang/go.git
synced 2025-11-08 12:41:02 +00:00
encoding/json: A JSON tag can be any valid JSON string.
Fixes #3887. R=golang-dev, daniel.morsing, remyoudompheng, rsc CC=golang-dev https://golang.org/cl/6997045
This commit is contained in:
parent
1cad1f8d1c
commit
475f3df43f
2 changed files with 11 additions and 1 deletions
|
|
@ -437,7 +437,7 @@ func isValidTag(s string) bool {
|
|||
}
|
||||
for _, c := range s {
|
||||
switch {
|
||||
case strings.ContainsRune("!#$%&()*+-./:<=>?@[]^_{|}~", c):
|
||||
case strings.ContainsRune("!#$%&()*+-./:<=>?@[]^_{|}~ ", c):
|
||||
// Backslash and quote chars are reserved, but
|
||||
// otherwise any punctuation chars are allowed
|
||||
// in a tag name.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue