2021
06-03
06-03
golang json数组拼接的实例
看代码吧~funcmain(){a:=[]byte(`{"Parents":["aaaaa","bbbbbbb"]}`)b:=[]byte(`{"Parents":["Gomez","Moticia"]}`)vararr[]interface{}js,_:=simplejson.NewJson(a)nodes,_:=js.Map()p:=nodes["Parents"]d:=p.([]interface{})for_,v:=ranged{arr=append(arr,v)}js,_=simplejson.NewJson(b)nodes,_=js.Map()p=nodes["Parents...
继续阅读 >