0
我试图在我的请求参数传递emaild ..春天MVC应用程序读取JSON输入 - 问题与emaild
在阅读它在我的控制器类我得到下面的异常..
[ Catch Exception : Error Message: Unexpected end-of-input: was expecting closing quote for a string value
at [Source: [email protected]; line: 1, column: 195] ]
http://localhost:8080/appln/fetch/
ipdata={"date":"2013-10-05","emailId":"[email protected]"}
如果我有EMAILID为 “myemailcom @ gmailcom” ..它工作得很好......
我的控制器代码看起来有点..
ObjectMapper mapper = new ObjectMapper();
mapper.readValue(ipdataString,InputRequestBean.class);
-
什么我得到的是...
{ “日期”: “2013年10月5日”, “EMAILID”:“我
和我的豆是
public class InputRequestBean {
private String date;
private String emailId;
/**
* @return the date
*/
public String getDate() {
return date;
}
/**
* @param date the date to set
*/
public void setDate(String date) {
this.date = date;
}
/**
* @return the emailId
*/
public String getEmailId() {
return emailId;
}
/**
* @param emailId the emailId to set
*/
public void setEmailId(String emailId) {
this.emailId = emailId;
}
}
请发布您的'InputRequestBean'类和您获得的实际JSON字符串。 –
所得到的是...... {“date”:“2013-10-05”,“emailId”:“我和我的豆是 – oxygenan
你可以编辑你的问题,你知道吗? –