WP-API/WP-API — pull request #400 by joshkadis (2014-08-01 21:09:12+00:00)
Title: issue 203: test json_last_error() after json_encode() or json_decode()

From WCNY hack day. A couple notes:

* I gave the option of translation for the range of potential error messages. Probably overkill.
* Do you think it's worth being so specific with the error messages or would just a blanket "There was an error with json_encode()" suffice?
* Also probably overkill to test `defined()` for each PHP JSON constant instead of just a switch statement.

Happy to revise as needed.