-
-
Notifications
You must be signed in to change notification settings - Fork 544
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
Add assertions on JsonElement
#2559
Labels
api-suggestion
Early API idea and discussion, it is NOT ready for implementation
Comments
vbreuss
added
the
api-suggestion
Early API idea and discussion, it is NOT ready for implementation
label
Jan 14, 2024
This was referenced Jan 14, 2024
Great. @jnyrup ? |
What about the negative of |
That's a good question (the negative is also missing in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Background and motivation
As discussed in #2205 we want support for
System.Text.Json
. I would suggest to keep it as similar as possible to the existing extension packageFluentAssertions.Json
.API Proposal
Add a new class
JsonElementAssertions
which contains assertion methods onJsonElement?
).This class can then be extended with assertions similar to
JTokenAssertions
inFluentAssertions.Json
.In the first step, I would keep the public surface quite small and only add the following methods:
In order to use these assertions, I would add the following methods to the
AssertionExtensions
:API Usage
When #2556 is also implemented, this could also be used as following:
Alternative Designs
No response
Risks
No response
Are you willing to help with a proof-of-concept (as PR in that or a separate repo) first and as pull-request later on?
Yes, please assign this issue to me.
The text was updated successfully, but these errors were encountered: