Corrects JSON checks to fix #315.

This could do with a test  in `app/tests` to ensure that the request outlined in issue #315 produces the expected behavior from now on.