1
當我發送json數組時,Spring會引發錯誤。我不知道我在這裏失去了什麼。Spring將不會反序列化json字符串(未引用的屬性)
RequestBody
{
"deliverySessionId":"c1fb327b-98a8-46d4-9e82-ce7507b5be93",
imageNames: ["name1", "name2"]
}
端點
@RequestMapping(value = { "/examImages/" }, method = { RequestMethod.POST })
public @ResponseBody ImageResponseCommand streamExamImages(@RequestBody ImageResponseCommand imageResponseCommand) {
錯誤
The request sent by the client was syntactically incorrect.
,如果我reque正常工作st不包含imageNames屬性。
{ "deliverySessionId":"c1fb327b-98a8-46d4-9e82-ce7507b5be93" }
嘗試把'imageNames'引號像'「imageNames」:[...]' – Supericy 2013-04-22 20:39:49
三江源,我可以把它標記爲一個答案,如果你想回答這個問題。 – ShaggyInjun 2013-04-22 20:42:24