hana
hana copied to clipboard
Client error handling?
Per 6901, JSON pointer error handling is up to the implementation. I see that Pointer is used here primarily to implement Patch, but would it be possible to make it so that an error could be handled by the user of Hana?
Specifically, in cases where there's no value at (an intermediate) index there's a lot of room to do useful things like fill in empty objects.
Also, - to refer to "the next item of an array" raises an error, where a client implementation might want to handle that somehow. (And Patch might want to add at /list/-)
If so, I'll volunteer a PR.
Yes, I think this is fine. Can you send a PR with a suggested implementation? I'm not sure what you have in mind exactly, so I'd like to see the code! :)