From 618a6f056d8a646e50c54b3b0dfe5ffb2a4b6357 Mon Sep 17 00:00:00 2001 From: huangsimin Date: Thu, 20 Dec 2018 10:56:25 +0800 Subject: [PATCH] for test --- parser_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parser_test.go b/parser_test.go index a60313d..55ea4d3 100644 --- a/parser_test.go +++ b/parser_test.go @@ -47,13 +47,13 @@ func (tt *Toutiao) ToDoParser(adstring string) (presult string, err error) { log.Println("test json -----------------------") var v interface{} - log.Println(label, gjson.Unmarshal([]byte(data), &v), gjson.Parse(data).Get("app").Exists()) + log.Println(label, gjson.Unmarshal([]byte(data), &v), gjson.Parse(data).Exists()) data = strings.Trim(data, "\"") unq, _ := strconv.Unquote("\"" + data + "\"") - log.Println(label, gjson.Unmarshal([]byte(data), &v), gjson.Parse(data).Get("app").Exists()) + log.Println(label, gjson.Unmarshal([]byte(data), &v), gjson.Parse(data).Exists()) data = unq - log.Println(label, gjson.Unmarshal([]byte(data), &v), gjson.Parse(data).Get("app").Exists()) + log.Println(label, gjson.Unmarshal([]byte(data), &v), gjson.Parse(data).Exists()) result := gjson.Parse(data) // log.Println(result.String())