mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 14:20:29 +01:00
Case sensitive true is ignored for JsonMatcher #205
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 @viktorpeacock on GitHub (Aug 22, 2019).
The JSON matcher is doing a deep compare on JSON string and it looks like it's case sensitive. When creating a matcher, I specify CaseSensitive = false, but this is not used by the matcher. Should it be possible to configure JSON matcher to be case insensitive?
https://github.com/WireMock-Net/WireMock.Net/blob/master/src/WireMock.Net/Matchers/JsonMatcher.cs
@StefH commented on GitHub (Aug 22, 2019):
This can be implemented, however only for strings.
@viktorpeacock commented on GitHub (Aug 22, 2019):
This would help a lot. Can try doing PR myself with a bit of direction on how you'd like this to be implemented.
@StefH commented on GitHub (Aug 22, 2019):
I'm looking into this.
@StefH commented on GitHub (Aug 22, 2019):
And would it be required to also match the property-names CaseIgnore? Or only the string-values?
@StefH commented on GitHub (Aug 22, 2019):
@viktorpeacock If you want to test this. see preview NuGet :
WireMock.Net.1.0.28-ci-11761@viktorpeacock commented on GitHub (Aug 22, 2019):
Hi, it would help if we could ignore case on both values and property names. Potentially have two properties: IgnoreCaseOnProperties and IgnoreCaseOnPropertyValues?
@StefH commented on GitHub (Aug 22, 2019):
Just a single
IgnoreCaseis easier to build and use I think.@StefH commented on GitHub (Aug 22, 2019):
Please test
WireMock.Net.1.0.28-ci-11769, this version renames the property name + value.@viktorpeacock commented on GitHub (Aug 23, 2019):
Any chance you can post a docker image please as we host wiremock in k8s?
Agree RE: IgnoreCase :-) Thank you so much for very fast response!
@StefH commented on GitHub (Aug 23, 2019):
I can merge this logic to the master and create a new Docker because (as far I see) the original logic is still the same.
So tonight or tomorrow I will create new Docker.
@StefH commented on GitHub (Aug 24, 2019):
@viktorpeacock docker is created
@viktorpeacock commented on GitHub (Aug 28, 2019):
Thank you. Will try this out today!