mikolalysenko / patcher.js

JSON diffing and patching library
Other
113 stars 7 forks source link

Patches for Array not compliant to JSON #1

Open jpfiset opened 12 years ago

jpfiset commented 12 years ago

When a patch is generated for an array, the index of the changed elements is used as the key for the definition of the change within the patch. This lead to a patch that contains numbers as keys, which is not compliant with JSON.

Therefore, where indices are concerned, they should probably be escaped as strings. Adding an underscore in front of indices might be a valid way to go.

jpfiset commented 12 years ago

I added code to fix this issue, but it ended up in the pull request for issue #2.

jpfiset commented 12 years ago

I am obviously not tuned the the GitHub UI. Ended up closing and reopening issue. Sorry for the spam.