Add some tests for the JSON validation code