{"action":"created","issue":{"url":"https://api.github.com/repos/myquay/JsonPatch/issues/8","labels_url":"https://api.github.com/repos/myquay/JsonPatch/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/myquay/JsonPatch/issues/8/comments","events_url":"https://api.github.com/repos/myquay/JsonPatch/issues/8/events","html_url":"https://github.com/myquay/JsonPatch/issues/8","id":54164695,"number":8,"title":"Allow the character \"-\" to denote a position after the last array element","user":{"login":"mindingdata","id":1021021,"avatar_url":"https://avatars.githubusercontent.com/u/1021021?v=3","gravatar_id":"","url":"https://api.github.com/users/mindingdata","html_url":"https://github.com/mindingdata","followers_url":"https://api.github.com/users/mindingdata/followers","following_url":"https://api.github.com/users/mindingdata/following{/other_user}","gists_url":"https://api.github.com/users/mindingdata/gists{/gist_id}","starred_url":"https://api.github.com/users/mindingdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mindingdata/subscriptions","organizations_url":"https://api.github.com/users/mindingdata/orgs","repos_url":"https://api.github.com/users/mindingdata/repos","events_url":"https://api.github.com/users/mindingdata/events{/privacy}","received_events_url":"https://api.github.com/users/mindingdata/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-13T08:54:14Z","updated_at":"2015-01-19T02:03:29Z","closed_at":null,"body":"JsonPatch and more so RFC 6901 (http://tools.ietf.org/html/rfc6901) allows for the use of \"-\" to denote a position after the last position of an array. This is important as at the moment the library only allows for you to use an integer past the last position, and then it will add onto the end. \r\n\r\nThe issue is if there is more than one addition to an array, we have to rely on the operations being ran in order. For example. \r\n\r\nExisting Array = 0,1,2\r\nNew Additions = 3,4\r\n\r\nIf the operations are ran as 3 then 4. It works fine. If it's run as 4,3. Then the array ends up looking like so 0,1,2,4 (And then it likely errors, I haven't tested this, but I'm unsure what would happen if you called ADD on an array with an index that is within the range already, it may actually end up looking like 0,1,2,3 with no 4 instead). \r\n\r\nI'm currently working on implementing a \"DiffHelper\" where it will output a list of \"JsonPatchOperations\" that you can then either output via JSON serialization, or move around internally to still use the existing \"Patching\" operations. But this definitely hinders that capability. "},"comment":{"url":"https://api.github.com/repos/myquay/JsonPatch/issues/comments/70438225","html_url":"https://github.com/myquay/JsonPatch/issues/8#issuecomment-70438225","issue_url":"https://api.github.com/repos/myquay/JsonPatch/issues/8","id":70438225,"user":{"login":"mindingdata","id":1021021,"avatar_url":"https://avatars.githubusercontent.com/u/1021021?v=3","gravatar_id":"","url":"https://api.github.com/users/mindingdata","html_url":"https://github.com/mindingdata","followers_url":"https://api.github.com/users/mindingdata/followers","following_url":"https://api.github.com/users/mindingdata/following{/other_user}","gists_url":"https://api.github.com/users/mindingdata/gists{/gist_id}","starred_url":"https://api.github.com/users/mindingdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mindingdata/subscriptions","organizations_url":"https://api.github.com/users/mindingdata/orgs","repos_url":"https://api.github.com/users/mindingdata/repos","events_url":"https://api.github.com/users/mindingdata/events{/privacy}","received_events_url":"https://api.github.com/users/mindingdata/received_events","type":"User","site_admin":false},"created_at":"2015-01-19T02:03:29Z","updated_at":"2015-01-19T02:03:29Z","body":"I don't mind making a stab, just waiting for my Pull request to be accepted (Or rejected) so I can add it there too. "}}