12345678_0001
我认为这是一个普遍的问题。这就是我让它工作的方式。func _UnescapeUnicodeCharactersInJSON(_jsonRaw json.RawMessage) (json.RawMessage, error) { str, err := strconv.Unquote(strings.Replace(strconv.Quote(string(_jsonRaw)), `\\u`, `\u`, -1)) if err != nil { return nil, err } return []byte(str), nil}func main() { // Both are valid JSON. var jsonRawEscaped json.RawMessage // json raw with escaped unicode chars var jsonRawUnescaped json.RawMessage // json raw with unescaped unicode chars // '\u263a' == '☺' jsonRawEscaped = []byte(`{"HelloWorld": "\uC548\uB155, \uC138\uC0C1(\u4E16\u4E0A). \u263a"}`) // "\\u263a" jsonRawUnescaped, _ = _UnescapeUnicodeCharactersInJSON(jsonRawEscaped) // "☺" fmt.Println(string(jsonRawEscaped)) // {"HelloWorld": "\uC548\uB155, \uC138\uC0C1(\u4E16\u4E0A). \u263a"} fmt.Println(string(jsonRawUnescaped)) // {"HelloWorld": "안녕, 세상(世上). ☺"}}https://play.golang.org/p/pUsrzrrcDG-希望这可以帮助某人。