I've two json files. They should be the same regardless formatting and ordering of elements.
For example these two jsons are equivalent because attributes and arrays are the same, only their order and the formatting type are different:
{
"type" : "integer",
"values": [
{
"value": 1
},
{
"value": 2
}
]
}
and
{
"values": [
{ "value": 1 }, { "value": 2 }
],
"type" : "integer"
}
If I store them into two separate strings and I compare them, obviously the comparison will say that they are different. Instead I want to check if they are equals from a semantic point of view, and they are because they have the same attributes, and respective arrays are the same.
Is there a way in C# to check that these two json are equivalent, if I store them in two separate strings?