json支持标准的list

This commit is contained in:
2021-03-12 23:08:48 +08:00
parent ade8a4f26e
commit 3c6c8067f8
2 changed files with 42 additions and 24 deletions

View File

@ -23,5 +23,8 @@ func TestJSON(t *testing.T) {
tree.SetValue("work", "111")
tree.SetValue("good.price", "180")
tree.SetValue("good.unit", "$")
tree.SetValue("slice.[0].name", "zhang")
tree.SetValue("slice.[1].name", "de")
tree.SetValue("slice.[2].name", "man")
fmt.Println(tree.String())
}