PaesslerAG/gval

no error return when compare with two data which with different type

willishen opened this issue · 1 comments

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"