JsonPartialMatcher fails to match on property name that JsonMatcher matches #648

Closed
opened 2025-12-29 15:29:40 +01:00 by adam · 3 comments
Owner

Originally created by @epDugas on GitHub (Nov 15, 2024).

Originally assigned to: @StefH on GitHub.

Describe the bug

JsonPartialMatcher fails to match when the json object contains a property name with value: urn:ietf:params:scim:schemas:extension:enterprise:2.0:User

Expected behavior:

The same json object that matches with JsonMatcher would match with JsonPartialMatcher.

Test to reproduce

  • Created test in JsonPartialMatcherTests.cs
  • Used input: { "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": "foo" }
  • Did not match

Notes

The JToken.SelectToken fails to find the token, presumably because it treats the value as a JPath expression, and returns null causing the INPUT param of the IsMatch method to be null.

Originally created by @epDugas on GitHub (Nov 15, 2024). Originally assigned to: @StefH on GitHub. ### Describe the bug JsonPartialMatcher fails to match when the json object contains a property name with value: `urn:ietf:params:scim:schemas:extension:enterprise:2.0:User` ### Expected behavior: The same json object that matches with JsonMatcher would match with JsonPartialMatcher. ### Test to reproduce - Created test in JsonPartialMatcherTests.cs - Used input: `{ "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": "foo" }` - Did not match ### Notes The JToken.SelectToken fails to find the token, presumably because it treats the value as a JPath expression, and returns null causing the INPUT param of the IsMatch method to be null.
adam added the bug label 2025-12-29 15:29:40 +01:00
adam closed this issue 2025-12-29 15:29:40 +01:00
Author
Owner

@StefH commented on GitHub (Dec 5, 2024):

@epDugas
I'm looking into this...

@StefH commented on GitHub (Dec 5, 2024): @epDugas I'm looking into this...
Author
Owner

@StefH commented on GitHub (Dec 5, 2024):

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

@StefH commented on GitHub (Dec 5, 2024): https://github.com/WireMock-Net/WireMock.Net/pull/1216
Author
Owner

@epDugas commented on GitHub (Dec 5, 2024):

Thanks @StefH !

@epDugas commented on GitHub (Dec 5, 2024): Thanks @StefH !
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#648