以下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 2011-03-06 21:30:07
+1我同意Satya。 – awm 2011-03-07 04:34:39