I want to assert that a subtree is contained but that the relative ordering of the items in arrays doesn't matter.
To give an example based on the code from the summary.
using FluentAssertions.Json;
void Main()
{
var json = JToken.Parse("{ id: 1, items: [ { id: 2, type: 'my-type', name: 'Alpha' }, { id: 3, type: 'other-type', name: 'Bravo' } ] }");
json.Should().ContainSubtree(JToken.Parse("{ items: [ { type: 'my-type', name: 'Alpha' }, { name: 'Bravo' } ] }"));
json.Should().ContainSubtree(JToken.Parse("{ items: [ { type: 'other-type', name: 'Bravo' }, { name: 'Alpha' } ] }"));
}
This gives an error of item[0] is in the wrong order.

I would like to be able to control this behaviour. Eg. have something similar to the options pattern for the main library's BeEquivalentTo?
actual.Should().BeEquivalentTo(expected, options => options.WithoutStrictOrdering());
I want to assert that a subtree is contained but that the relative ordering of the items in arrays doesn't matter.
To give an example based on the code from the summary.
This gives an error of item[0] is in the wrong order.
I would like to be able to control this behaviour. Eg. have something similar to the options pattern for the main library's
BeEquivalentTo?actual.Should().BeEquivalentTo(expected, options => options.WithoutStrictOrdering());