avian2 / jsonmerge

Merge a series of JSON documents.
MIT License
214 stars 25 forks source link

"append" strategy can produce invalid documents #9

Closed avian2 closed 10 years ago

avian2 commented 10 years ago

For instance, if schema sets maxItems, append does not honor that. Same thing with the unique keyword.

The broader question is: Should merge strategies inspect the schema at all (apart from what is necessary to determine the merge strategy) and adapt their behavior to it or should that be left to the user? Is it an error if the user sets "append" strategy for an array that will overflow maxItems?