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

RFC6902 support #9

Merged
merged 5 commits into from
Apr 7, 2016
Merged

RFC6902 support #9

merged 5 commits into from
Apr 7, 2016

Conversation

thsutton
Copy link
Owner

This is a quick sketch based on glancing at some examples.

  • Produce RFC6902 patches
  • Apply RFC6902 patches
  • Extract examples from the RFC as tests
  • Correct accounting for position advances due to changes.

@thsutton
Copy link
Owner Author

Will address #8 when complete.

@thsutton thsutton force-pushed the rfc6902 branch 2 times, most recently from bcb6d87 to f334de7 Compare March 15, 2016 06:49
@thsutton
Copy link
Owner Author

The remaining bug seems to be in the way the keys for arrays are accounted for as changes accumulate. Here's an example bad diff and the source and target documents:

[{"op":"replace","path":"/0/0","value":{}}   // OK
,{"op":"remove","path":"/0/1"}                  // OK
,{"op":"replace","path":"/0","value":[]}      // BAD should be /1
,{"op":"add","path":"/1/�\u0003","value":[0]} // BAD should be /2
,{"op":"replace","path":"/1/","value":[false]} // BAD should be /2
]

[[[null],[]],{"":[-1]},{"":{"":-1}}]

[[{}],[],{"":[false],"�\u0003":[0]}]

@thsutton thsutton self-assigned this Mar 31, 2016
@thsutton thsutton added this to the 1.0 milestone Mar 31, 2016
@thsutton thsutton merged commit e424bf3 into master Apr 7, 2016
@thsutton thsutton deleted the rfc6902 branch April 7, 2016 06:43
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

Successfully merging this pull request may close these issues.

None yet

1 participant