This commit is contained in:
eson 2018-12-20 03:49:05 +08:00
parent 9c5c58295a
commit 4f3932b86b

View File

@ -49,11 +49,12 @@ func (tt *Toutiao) ToDoParser(adstring string) (string, error) {
data = strings.Trim(data, "\"")
unq, _ := strconv.Unquote("\"" + data + "\"")
data = unq
unq, _ = strconv.Unquote("\"" + data + "\"")
data = unq
var gv interface{}
gjson.Unmarshal([]byte(data), &gv)
spew.Dump(gv)
result := gjson.Parse(data)
log.Println(result.String())
if result.Get("app").Exists() {
log.Println("this is app")
}
var v interface{}
json.Unmarshal([]byte(data), &v)