From 96437b419b955e6fe2e00bbb24761e89310f4343 Mon Sep 17 00:00:00 2001 From: eson <474420502@qq.com> Date: Thu, 20 Dec 2018 03:36:52 +0800 Subject: [PATCH] 213 --- parser_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/parser_test.go b/parser_test.go index 641e575..0d92421 100644 --- a/parser_test.go +++ b/parser_test.go @@ -8,6 +8,8 @@ import ( "strings" "testing" + "github.com/tidwall/gjson" + "github.com/davecgh/go-spew/spew" ) @@ -43,6 +45,9 @@ func (tt *Toutiao) ToDoParser(adstring string) (string, error) { spew.Dump(adlist) for _, data := range adlist { + var gv interface{} + gjson.Unmarshal([]byte(data), &gv) + log.Println(gv) data = strings.Trim(data, "\"") unq, _ := strconv.Unquote("\"" + data + "\"") unq, _ = strconv.Unquote(unq)