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

Json path on java List types not working #9

Closed
ptrthomas opened this issue Feb 23, 2017 · 0 comments
Closed

Json path on java List types not working #9

ptrthomas opened this issue Feb 23, 2017 · 0 comments
Assignees
Labels

Comments

@ptrthomas
Copy link
Member

* def json = { foo: [{ bar: 1}, {bar: 2}, {bar: 3}]}
* def list = json.foo
* match list[0].bar == 1

Fails with:

java.lang.RuntimeException: not json, cannot do json path for value: [type: LIST, value: [{"bar":1},{"bar":2},{"bar":3}]], path: $[0].bar
	at com.intuit.karate.Script.matchJsonPath(Script.java:497)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant