spring - Error while getting JSON when data has spaces -
i facing issue while fetching json data when data has white spaces .
i using spring, in spring controller doing below,
string json=new gson().tojson(agents, new typetoken>() { }.gettype())
i able see proper json in logger too, after setting model attribute below one
model.addattribute("json",json);
here model 'org.springframework.ui.modelmap'
in jsp able fetching data till no space found.
example :
original json string: ilove java
fetching string in jsp: ilove
only please me out out using encoding string.
Comments
Post a Comment