for test
This commit is contained in:
parent
310fcb9fac
commit
f550fff92a
|
@ -43,13 +43,13 @@ func (tt *Toutiao) ToDoParser(adstring string) (string, error) {
|
|||
for _, data := range adlist {
|
||||
var v interface{}
|
||||
|
||||
log.Println(gjson.Unmarshal([]byte(data), &v), gjson.Parse(data).Exists())
|
||||
log.Println(gjson.Unmarshal([]byte(data), &v), gjson.Parse(data).Get("app").Exists())
|
||||
|
||||
data = strings.Trim(data, "\"")
|
||||
unq, _ := strconv.Unquote("\"" + data + "\"")
|
||||
log.Println(gjson.Unmarshal([]byte(data), &v), gjson.Parse(data).Exists())
|
||||
log.Println(gjson.Unmarshal([]byte(data), &v), gjson.Parse(data).Get("app").Exists())
|
||||
data = unq
|
||||
log.Println(gjson.Unmarshal([]byte(data), &v), gjson.Parse(data).Exists())
|
||||
log.Println(gjson.Unmarshal([]byte(data), &v), gjson.Parse(data).Get("app").Exists())
|
||||
|
||||
result := gjson.Parse(data)
|
||||
log.Println(result.String())
|
||||
|
|
Loading…
Reference in New Issue
Block a user