From 6ef44cb29474c1a66f99c53b22d2044788244012 Mon Sep 17 00:00:00 2001 From: eson <474420502@qq.com> Date: Thu, 20 Dec 2018 03:28:58 +0800 Subject: [PATCH] 213 --- parser_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/parser_test.go b/parser_test.go index 83c2bbb..529d1a0 100644 --- a/parser_test.go +++ b/parser_test.go @@ -4,6 +4,7 @@ import ( "encoding/json" "log" "regexp" + "strconv" "strings" "testing" @@ -43,6 +44,8 @@ func (tt *Toutiao) ToDoParser(adstring string) (string, error) { for _, data := range adlist { data = strings.Trim(data, "\"") + unq, _ := strconv.Unquote("\"" + data + "\"") + data = unq var v interface{} json.Unmarshal([]byte(data), &v) spew.Dump(v)