Should this include the output stream in the error?  Also, this begin/parse/rescue/fail bit of code could benefit from being extracted into a `parse_json` helper method, I think.  It's a bit noisy inline in the example.

BTW, what caused you to add the rescue/fail?