다음 JSON 데이터 구문 분석에서 무엇이 잘못 되었습니까?이 오류가 발생하는JSON 데이터를 파싱하는 데 문제가 있습니다.
'{
{"errors":
{"firstname":"is too short"}
},
{"account":
{"firstname":"Test"}
}
}'
JSON::ParserError in AccountsController#home
706: unexpected token at ... # the code above
?
AccountsController에서
JSON.parse(json_data)["errors"]
가 있습니다.
이것은 데이터가 주어질 때 가장 좋은 시나리오입니다. – Satya
+1 나는 Satya에 동의합니다. – awm