Skip to content

Convenience Methods for Object Equality Via JSON Serialization

License

Notifications You must be signed in to change notification settings

ColmBhandal/JsonEquals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JsonEquals

Convenience Methods for Object Equality Via JSON Serialization.

Comparing objects via JSON serialization has the advantage that you don't have to repeatedly define equals methods for custom objects e.g. when writing tests for those objects. Instead, the idea is just to serialize to JSON and then compare the strings. It may not be the fastest way to compare objects, but for small objects e.g. used in unit tests, it's ideal and saves you time having to write out separate custom equality methods per class.

Usage

You can import this library using NuGet. The NuGet page is here. Example usage can be found on DotNetFiddle.

References

About

Convenience Methods for Object Equality Via JSON Serialization

Resources

License

Stars

Watchers

Forks

Packages

No packages published