clean up json validation