Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add string diff support #10

Open
tmbb opened this issue Sep 19, 2017 · 3 comments
Open

Add string diff support #10

tmbb opened this issue Sep 19, 2017 · 3 comments

Comments

@tmbb
Copy link

tmbb commented Sep 19, 2017

I might submit a PR handling this one of these days, if you're interested.

@olafura
Copy link
Owner

olafura commented Sep 19, 2017

I'm definitely interested, it's just been a nice to have but for anybody that needs it I think they would be thankful.

I really need to write a contributor's guide, the most important thing at the moment is keeping good enough compatibility with jsondiffpatch. Good enough because sometimes there are better ways of doing some of the diffs that will still translate into the same outcomes when using the library for patching.

My most recent PR focused on lists and I switched to using a built in function for that. I know that most string diffs are similar to lists.

@tmbb
Copy link
Author

tmbb commented Sep 19, 2017

String diffs are supported by jsonpatchdiff: https://github.com/benjamine/jsondiffpatch#live-demo, so I think we can support it too. I'm still not sure whether I actually need JSON diffs for my project, so I'm not sure I'll actually work on the PR.

@olafura
Copy link
Owner

olafura commented Sep 23, 2017

@tmbb No problem, I'm not using this library for work either. I did have ideas of using it for my company I worked for because we were dealing with a really big and nasty json structure and json diff works really well with those. It's sort of like when dealing with legacy databases. You usually don't want to use these kinds of techniques unless you have to 😄

There might be a killer feature for this library, maybe I could look into doing it for the graphql queries we are doing, who knows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants