mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 14:20:29 +01:00
Issue: JsonPathMatcher - not working for rootless jsons? #71
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @FSatmar on GitHub (Mar 1, 2018).
Originally assigned to: @StefH on GitHub.
Hi,
Could you pls help me with defining a JsonPathMatcher for a json of the type:
I have tried "$.[?(@.id == 1)]" but it doesn't seem to work.
I tried it with the following test as well:
@StefH commented on GitHub (Mar 2, 2018):
When testing at http://jsonpath.herokuapp.com/
This works...

So actually, I don't know what's wrong?
@FSatmar commented on GitHub (Mar 2, 2018):
I tried it like this:
But still no luck.
Also tried it against a real mapping with a real request using Postman & JaSon and only got the "No matching found" response.
@StefH commented on GitHub (Mar 2, 2018):
For some reason:
It should be
"$..[?(@.Id == 1)]".See linked unit-test.--->
2b8a58c68cMaybe a bit related to https://github.com/JamesNK/Newtonsoft.Json/issues/1256 ?
@StefH commented on GitHub (Mar 24, 2018):
@FSatmar This is now fixed, please check new NuGet 1.0.3.12
@FSatmar commented on GitHub (Mar 26, 2018):
Great, it's working with the double dots, thank you very much!