Comparing C# objects using Json

c#, equals, json

Solution

What are the downsides of comparing them in this way

Loss of speed. Transforming objects into JSON strings and then comparing them is much slower than doing a property by property equals.

Implementing `Equals()` is always the best way to compare two objects for equality.

Problem

I want to compare two objects without implementing the Equals() method. What are the downsides of comparing them in this way: 1. serilizing them with Json 2. comparing the results thanks!

Original source

Related problems