gval
gval copied to clipboard
no error return when compare with two data which with different type
like the following code:
dataMap := map[string]interface{}{"key1": 1, "data": map[string]interface{}{"name": "will", "age": 23}}
val, err := gval.Evaluate("$.data > 2",dataMap , gJsonpath.Language())
if err != nil {
fmt.Println(err)
return
}
fmt.Println("parse success, ", val)
The jsonpath expression get a map, when a map compare with a number, I expect return an error. but the result is "true nil"