-
Notifications
You must be signed in to change notification settings - Fork 114
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
Consider JsonComparator implementation for Spring Framework 6.2.0 #767
Comments
commonquail
changed the title
Consider JsonComparator implementation for Spring Framework 6.2.0
Consider JsonComparator implementation for Spring Framework 6.3.0
May 26, 2024
commonquail
changed the title
Consider JsonComparator implementation for Spring Framework 6.3.0
Consider JsonComparator implementation for Spring Framework 6.2.0
May 26, 2024
Hi, thanks. I will look into that. |
lukas-krecan
added a commit
that referenced
this issue
Jun 9, 2024
Basic support is here https://github.com/lukas-krecan/JsonUnit/pull/772/files |
lukas-krecan
added a commit
that referenced
this issue
Jun 9, 2024
lukas-krecan
added a commit
that referenced
this issue
Jun 9, 2024
That's quite elegant |
It will be part of 4.x release once Spring 6.2 is out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is to let JsonUnit know that Spring Framework 6.2.0 is expected to include an
o.s.t.w.s.r.ContentResultMatchers::json
overload that takes ano.s.t.j.JsonComparator
, aBiFunction<@Nullable String, @Nullable String, JsonComparison>
, that evaluates a comparison of actual and expected JSON values. JsonUnit may wish to consider this extension mechanism as a complement to its existing Spring Framework integrations.It looks to me like no official public API of JsonUnit facilitates an ergonomic implementation of
JsonComparator
but that perhaps the internalDiff
would be the implementation to base an extension on. For now, the following is the plainest implementation I can come up with:See also
The text was updated successfully, but these errors were encountered: