























项目地址:
https://github.com/alibaba/jsonq
示例json
{ "foo": 1, "bar": 2, "test": "Hello, world!", "baz": 123.1, "array": [ {"foo": 1}, {"bar": 2}, {"baz": 3} ], "subobj": { "foo": 1, "subarray": [1,2,3], "subsubobj": { "bar": 2, "baz": 3, "array": ["hello", "world"] } }, "bool": true }
调用
import ( "strings" "encoding/json" "github.com/jmoiron/jsonq" ) data := map[string]interface{}{} dec := json.NewDecoder(strings.NewReader(jsonstring)) dec.Decode(&data) jq := jsonq.NewQuery(data)
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。