Re:Replacing Throwing Exceptions with Notification in Valida...
by dragonwriter on Saturday December 13, 2014 @06:48PM
(#8746941)
> JSON is machine to machine communication. Why do you need to report more than the first error? One of the programs talking is broken. What next, parser error recovery for bad JSON?
JSON is a data serialization format; it might be used for machine-generated data, but it can also be used to serialize raw user input and transport it to another node for validation. For the latter use case, multiple errors can be important.
Re:Replacing Throwing Exceptions with Notification in Valida...
by justincormack on Saturday December 13, 2014 @06:21PM
(#8746866)
JSON is becoming less like that, the JSON might encode a form the user has filled in, and it might be reporting the set of validation errors, as part of the API.
As for the original article, JSON is machine to machine communication. Why do you need to report more than the first error? One of the programs talking is broken. What next, parser error recovery for bad JSON?