Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
willishen opened this issue Jan 12, 2022 · 1 comment
Open

Comments

@willishen
Copy link

No description provided.

@willishen
Copy link
Author

willishen commented Jan 12, 2022

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"

@willishen willishen changed the title logic no error return when compare with two data which with different type Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant