Validtion and coercion for JSON.