Once our software releases JSON, it is difficult to test. Consider the following:
Assuming that the json output which corresponds to the size of the JSON, this will work. If it doesn’t work, we get the next big cable that tells us the strings were different.
But JSON is not a Cable
What we really need is for JSON’s unconventional errors to contain information for other reasons were different. We also do not want to give JSON any other good way if it could be avoided.
Using the cable to compare JSON with Assertion Diversion. It makes us work harder to find the comparisons we want.
JSON often has unforeseen circumstances
Internet call results may contain parameters that we do not care about (server url in
_self field), or timestamp or change ID, which changes from time to time.
We want to be able to ignore such sections, just look at the areas we have, or use afemphasizing uzzy to the output data.
The program of
JSONAssert The library has been useful compared to JSON, but it contains some errors:
- Its analogy is hard to use
- Holds only parallel prices
- It has a few modifications / preferences
- It can be used as an independent
- Can be used with JSON Strings
I have already added some useful tips, but it is time for me to answer my question.
Depending on the style of
AssertJ, and provided both official and both
Hamcrest I AM
Mockito the same,
ModelAssert it is almost in complete form.
Allows pricing, pricing comparisons, subtrees, preferences, YAML support, JSON computing, and nonsense.
More to follow soon.