Closed ClementVaillantCodit closed 1 month ago
For now, focus on supporting name
, index
and wildcard
in json path due to limitations in System.Net.Json.
We won't support that for now, as System.Text.Json does not provide support for JSON path. For now we recommend using Newtonsoft.Json library to remove node from input before executing the comparison. Closed by #163
Can we add support to ignore node using a Json path syntax? Maybe add a "IgnoreJsonPath" option for that. In the testing framework ignoring of nodes was made this way:
Json.Compare(outputStream, expectedOutputStream, out message, new string[] { "$.UnitTestOutputComparison.unittest" });
That would allow a lot more flexibility while comparing.
When I use:
with this input:
I currently have no way to exclude
$.path.unittest
from the ignored nodes.Another suggestion, can we rename option
IgnoreNode
byIgnoreAllNodes
, since it traverses the whole tree to exclude this node?