json_filter/syntax_test.go

39 lines
748 B
Go
Raw Normal View History

2022-07-05 17:48:40 +08:00
// Package filter ...
//
// Description : filter ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2022-07-05 17:43
package filter
import (
"testing"
)
func Test_syntax_Parse(t *testing.T) {
jsonData := `{
"start" : 123456,
"name" : "zhangsan",
"age":"18",
"extension":{
"sex":"man",
"height":"180"
},
"teacher_list":[
{
"name":"t1",
"age":"11"
},
{
"name":"t2",
"age":"12"
}
]
}`
//jsonData = `{"name":"zhangsan","age":"18","extension":{"sex":"man","height":"180"},"teacher_list":[{"name":"t1","age":"11"},{"name":"t2","age":"12"}]}`
instance := NewSyntax(jsonData)
_ = instance.Parse()
}