JsonPathMatcher always convert to JArray before matching #193

Closed
opened 2025-12-29 08:23:41 +01:00 by adam · 10 comments
Owner

Originally created by @mapjaha on GitHub (Jul 30, 2019).

Originally assigned to: @StefH on GitHub.

Originally created by @mapjaha on GitHub (Jul 30, 2019). Originally assigned to: @StefH on GitHub.
adam added the bug label 2025-12-29 08:23:41 +01:00
adam closed this issue 2025-12-29 08:23:41 +01:00
Author
Owner

@mapjaha commented on GitHub (Jul 30, 2019):

I have query with this body { "x": "42" }
To check with JsonPathMatcher if x property exist i need this pattern: "$[0].x".
According to your documentation it should be "$.x".
this is my configuration for Wiremock:

  server
                .Given(
                    Request.Create().WithPath("/jmespath_example").UsingPost()
                        .WithBody(new JsonPathMatcher("$[0].x"))
                )
                .RespondWith(Response.Create().WithBody("Hello"));
@mapjaha commented on GitHub (Jul 30, 2019): I have query with this body { "x": "42" } To check with JsonPathMatcher if x property exist i need this pattern: "$[0].x". According to your documentation it should be "$.x". this is my configuration for Wiremock: ``` c# server .Given( Request.Create().WithPath("/jmespath_example").UsingPost() .WithBody(new JsonPathMatcher("$[0].x")) ) .RespondWith(Response.Create().WithBody("Hello")); ```
Author
Owner

@StefH commented on GitHub (Aug 2, 2019):

https://github.com/WireMock-Net/WireMock.Net/pull/311

@StefH commented on GitHub (Aug 2, 2019): https://github.com/WireMock-Net/WireMock.Net/pull/311
Author
Owner

@StefH commented on GitHub (Aug 2, 2019):

I think I fixed it, can you try this WireMock.Net.1.0.26-ci-11553 from MyGet , https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions

@StefH commented on GitHub (Aug 2, 2019): I think I fixed it, can you try this WireMock.Net.1.0.26-ci-11553 from MyGet , https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions
Author
Owner

@mapjaha commented on GitHub (Aug 5, 2019):

Maybe yes, but as far as i can see your PR is open.
When it will be released?

@mapjaha commented on GitHub (Aug 5, 2019): Maybe yes, but as far as i can see your PR is open. When it will be released?
Author
Owner

@StefH commented on GitHub (Aug 5, 2019):

You can try the preview version which is available at MyGet:

WireMock.Net.1.0.26-ci-11553 from MyGet , https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions

@StefH commented on GitHub (Aug 5, 2019): You can try the preview version which is available at MyGet: WireMock.Net.1.0.26-ci-11553 from MyGet , https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions
Author
Owner

@StefH commented on GitHub (Sep 1, 2019):

@mapjaha Did you have time to test this?

@StefH commented on GitHub (Sep 1, 2019): @mapjaha Did you have time to test this?
Author
Owner

@mapjaha commented on GitHub (Sep 1, 2019):

Hi Stef,
sorry i have no time to test it. But when i do i will let you know my
feedback.

Best regards,
Maryana

niedz., 1 wrz 2019 o 11:59 Stef Heyenrath notifications@github.com
napisał(a):

@mapjaha https://github.com/mapjaha Did you have time to test this?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/WireMock-Net/WireMock.Net/issues/307?email_source=notifications&email_token=ACHKULKAUB3LPLGBV5TB2R3QHOG7VA5CNFSM4IH3STTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5T6ZEQ#issuecomment-526904466,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACHKULNQKRHPFJGUOPNVXH3QHOG7VANCNFSM4IH3STTA
.

@mapjaha commented on GitHub (Sep 1, 2019): Hi Stef, sorry i have no time to test it. But when i do i will let you know my feedback. Best regards, Maryana niedz., 1 wrz 2019 o 11:59 Stef Heyenrath <notifications@github.com> napisał(a): > @mapjaha <https://github.com/mapjaha> Did you have time to test this? > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <https://github.com/WireMock-Net/WireMock.Net/issues/307?email_source=notifications&email_token=ACHKULKAUB3LPLGBV5TB2R3QHOG7VA5CNFSM4IH3STTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5T6ZEQ#issuecomment-526904466>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/ACHKULNQKRHPFJGUOPNVXH3QHOG7VANCNFSM4IH3STTA> > . >
Author
Owner

@StefH commented on GitHub (Sep 23, 2019):

@mapjaha Did you have time to test?

@StefH commented on GitHub (Sep 23, 2019): @mapjaha Did you have time to test?
Author
Owner

@mapjaha commented on GitHub (Oct 9, 2019):

@StefH
Hi Steff,
sorry for no reply so long.
I have checked changes from this PR https://github.com/WireMock-Net/WireMock.Net/pull/311 and it works.
I can confirm that changes solve my issue.

@mapjaha commented on GitHub (Oct 9, 2019): @StefH Hi Steff, sorry for no reply so long. I have checked changes from this PR https://github.com/WireMock-Net/WireMock.Net/pull/311 and it works. I can confirm that changes solve my issue.
Author
Owner

@StefH commented on GitHub (Oct 9, 2019):

Thank you for testing.

A new NuGet will be released in few days.

@StefH commented on GitHub (Oct 9, 2019): Thank you for testing. A new NuGet will be released in few days.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net#193