NMatcher is a test utility, that lets you easier test responses and json, when some part of the response is something out of your control (autogenerated id, guid, datetime etc). It ports functionality of original php-matcher library to dotnet.
Install-Package NMatcher.FluentAssertions
Read the full documentation here.
using NMatcher.FluentAssertions;
@"{
""id"" : ""5a645a20-5225-431b-8c62-031b87f58b73"",
""foo"": ""bar""
}"
.Should()
.MatchJson(@"
{
""id"": ""@guid@"",
""foo"": ""@string@""
}"
);
This library is distributed under the MIT license. Please see the LICENSE file.