hashdiff icon indicating copy to clipboard operation
hashdiff copied to clipboard

Handle multi dimentional arrays in path decoder

Open dmitrytrager opened this issue 2 years ago • 8 comments

This fixes issue related to handling multi dimensional arrays in path

dmitrytrager avatar Aug 28 '22 19:08 dmitrytrager

Thanks @dmitrytrager . What's your use case? Multi-dimentional arrays will not work nicely with this library due to its limitations.

liufengyun avatar Sep 14 '22 09:09 liufengyun

My case is exactly like mentioned: nested arrays within hash. With this fix we can handle changes within structure like this properly.

dmitrytrager avatar Sep 15 '22 10:09 dmitrytrager

I see. But generally, the diff generated by multi-dimensional arrays will be very bad to be useful.

liufengyun avatar Sep 15 '22 16:09 liufengyun

Could you please give more details about reasons here? B/c right now it looks like if my structure includes these, then diff should be very useful.

dmitrytrager avatar Sep 15 '22 17:09 dmitrytrager

Could you please give more details about reasons here?

The reason is that telling whether two arrays are similar may not make much sense in most scenarios.

liufengyun avatar Sep 15 '22 20:09 liufengyun

Sorry, I don't get how does less frequent scenario mean "very bad to be useful"

dmitrytrager avatar Sep 16 '22 10:09 dmitrytrager

Sorry, I don't get how does less frequent scenario mean "very bad to be useful"

I don't have objective data to tell whether it's generally useful or not. I just want to avoid disappointing the users with a feature that is not well-considered.

Anyway, thank you for making the PR and making the use case known. Let's wait for more users to share their feedback on this feature.

liufengyun avatar Sep 16 '22 22:09 liufengyun

Ok, having feedback would be great

dmitrytrager avatar Oct 16 '22 18:10 dmitrytrager