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

how to parse complex json with jsonpath? #95

Open
fengnex opened this issue Apr 30, 2023 · 0 comments
Open

how to parse complex json with jsonpath? #95

fengnex opened this issue Apr 30, 2023 · 0 comments

Comments

@fengnex
Copy link

fengnex commented Apr 30, 2023

value, err := gval.Evaluate($["response-time"]+" "+$["request.method"],
map[string]interface{}{
"response-time": 100,
"response-time1": 110,
"request": {
"method": "GET",
"path": "/hello/2",
} //here causes syntax error: unexpected newline, expecting comma or }, how to fix it?
},
jsonpath.Language(),
)

Please check the above code when want to include nested json content, which always leads to the above specified syntax error

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