-
Notifications
You must be signed in to change notification settings - Fork 452
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
How can i use it with Google diff match patch library #532
Comments
It's not an OT type, but this diffing library can translate output from Google's diff-match-patch into JSON0 or JSON1 ops: https://github.com/kbadk/json0-ot-diff |
Thanks for the answer @curran. One more thing, the use case we have is based on real time editing of json document, and I see json0 ot type as a great fit for this use case, unfortunately i couldn't find a client library implementation for json0 diffs in java for Android app client. Is there a supported library written in java for json0? |
I don't believe there are any Java implementations for json0. |
That seems like a deadend. I found this json diff library for java zjsonpatch . Can you guide me if i want to use it, do i need to implement this as a new ot-type library by providing definition for all the required functions? |
I have no experience with ShareDB + Java. I don't think anyone does. It would probably be quite difficult to build a ShareDB client in Java. Perhaps you can use JavaScript within your Android app? |
Android doesn't run js natively, it's really difficult to run js as logic in as a part of native app. On the other note I think i'll be able rewrite some part of google-diff algo and produce ot-text like diffs to send, but i was worried about using text ot for a json document, one character wrong patch can make the whole document unusable with json parsing errors. In your experience have you seen ot text working well for json documents too? (As in the end each json can be presented as text.) |
You're right that text OT is not suitable for JSON, as like you say, one wrong patch can make the whole thing unstable. |
Thanks for all the help, saved me some experimentation time. |
Suggest to close this issue. |
Our client app is Android and written in Java, we use Google's diff-match-patch library extensively. How do we use sharedb with this as ot type?
The text was updated successfully, but these errors were encountered: