mods to test JSON for validity