swaggest / json-diff

JSON diff/rearrange/patch/pointer library for PHP
MIT License
220 stars 30 forks source link

Issue with comparing arrays #38

Closed webpunk closed 3 years ago

webpunk commented 4 years ago

Hi,

Sorry to bother you again. But when comparing two JSON objects, there is still a problem if the two contain an array whose contents are the same but do not appear in the same order in the array. Enclosed two JSON documents for testing.

Is there a chance to get a fix for this?

Thanks a lot Christian

Archiv.zip

zthomas1 commented 3 years ago

I'm not sure if anyone will see this but, are you having this issue with the rearrange option set?

vearutop commented 3 years ago

Please try v3.8.3, it now also checks hashes of non-scalar properties to use as rearrange base.