JSON validation utility.