issue 203: test json_last_error() after json_encode() or json_decode()
Merge branch 'master' into 203-json-error
move json_encode/decode error translation to get_json_last_error() method
return JSON encoded error inside serve_request()
fix status headers and move all translation into WP_JSON_Server::get_json_last_error(), then change to switch() statement for returning
Correct error message string formatting
Correct switch formatting and indentation
Don't prefix error messages

Totally changed my mind on this, since they're included in the code.
Split error handling into two functions

Splits the actual error message generator into json_last_error_msg(),
which has full compatibility with PHP 5.5's function.

Note: error messages updated to match PHP source; see
https://github.com/php/php-src/blob/b2d2b965b2ddb2e013a15a8858420f18614562a9/ext/json/json.c#L840-L872
Tweak switch for coding standards
Merge branch 'master' into json-error-reporting
Merge pull request #461 from WP-API/json-error-reporting

Check for JSON encoding/decoding errors