WARNING: This server is unstable and will be retired in the next days.
If you want to keep this forum available, please request immediately a migration
on the Nabble Support forum.
Forums that don't receive any migration request will be deleted forever.
I was looking for JSON patch formats available and found this draft. It looks nice - concise and to the point. I would like to share few comments I have.
1. I am not sure if 'test' operation should be part of it. The purpose of the patch is to modify the document. 'test' operation either succeeds of fails, but it is unclear how this information will be communicated or used. It almost looks like a API operation rather than patch format instruction. I would argue that in current state it should not be included in the format.
I could see a case when it could be included as a part of conditional syntax. In this case 'test' becomes a container for other operations which would be executed only if the test succeeds. For example:
2. In most examples "value" property holds simple scalar values (strings or integers) or arrays of such. I think it should be possible to use arbitrary complex JSON data structures as such values. I hope this was the intention. Perhaps adding an example with more complex value (object or array) could illustrate this very powerful capability. For example A.1 could be modified as following;