intelie / immutable-js-diff

MIT License
260 stars 32 forks source link

since we have diff, how about patch? #2

Closed tiye closed 9 years ago

tiye commented 9 years ago

I'm using jsondiffpatch in my experimental project sync-chat but suffering from the mutable data. Suppose I use immutable-js-diff, how can I do patching?

pedroteixeira commented 9 years ago

Currently patch is in another repo: https://github.com/intelie/immutable-js-patch/ -- the things is we also have a 'json schema' for the underlying data, so we should be able to make patch more robust (auto-create the correct strutcture if it does not exist, for ex).

tiye commented 9 years ago

I didn't notice anything about "JSON Schema", what's that?

pedroteixeira commented 9 years ago

Way to describe data structure: http://json-schema.org/ It's not implemented here in this repo, just giving you some heads up on the topic. The json diff/patch specs do not depend on it, but if you have it around, I think it can be useful.

tiye commented 9 years ago

Yes, Schema is useful in validation, just like static typing.