gjson icon indicating copy to clipboard operation
gjson copied to clipboard

Add Result.Equal(r Result, bool caseSensitive) bool

Open bjoerndemeyer opened this issue 2 years ago • 0 comments

I have a need for an Equal comparison for Results. Now I am simulating it with ! r1.Less(r2) && !r2.Less(r1) but that does not seem very performant. The == operator cannot be used on Result, it gives: invalid operation: r1 == r2 (struct containing []int cannot be compared). I'm willing to provide a PR for this if you think the Equal method for Result is acceptable.

bjoerndemeyer avatar May 16 '22 23:05 bjoerndemeyer