josephburnett / jd

JSON diff and patch
MIT License
826 stars 38 forks source link

Iss 057 #63

Closed adatoo closed 6 months ago

adatoo commented 6 months ago

@josephburnett

I had the same need to include a parameter for precision. I have updated the code to support this feature.

Some notes:

Please reach out if you would like me to make any changes or need clarification.

Thanks for the amazing utility.

adatoo commented 6 months ago

Happy to do these changes. However, I have a question:

It appears that the master is targetting the v2 release - for example, in main.go the import statement on line 12 is importing the jd package from the v2 folder as opposed to the lib folder. Also in main.go, the parseMetadata function is using the new Option type which replaces the Metadata type in your v1 release. However the v2 folder still seems to have the Metadata type defined.

My confusion is that I rebase the changes on master, do I need to make my changes against the code in the v2 folder as opposed to the lib folder?

josephburnett commented 6 months ago

I thought that v2 was ready for prime time. But I've encountered a few bugs, fixed in another branch. So I'm going to put it behind a flag, defaulting to false. Your changes against lib are fine. The ones in main.go might need to wait until I change back to v1.

If you wouldn't mind, will you update the pull request with just the lib changes, which should rebase cleanly. Then I'll update main.go and we can add the flag then. Should be just a day or two.