I have seen this in all the guides for PHP, I don't quite understand why we need such a verbose error handling. If the JSON is malformed it would be a bug in the platform. Why would the customer application need verbose error handling?