带有utf8双引号的GSON MalformedJsonException

时间:2017-10-24 12:23:04

标签: java utf-8 gson jira

在前端我用

JSON.stringfy({comment: "1. It's better to use standard abbreviation for Minutes and Seconds, the “ “Mn” “Sc” is hard to understand"})

在后端:

Comment comment = new Gson().fromJson(value, Comment.class);

得到:

com.google.gson.stream.MalformedJsonException: Unterminated object at line 1 column 213 path $.comment

符号问题:

enter image description here

使用其他字符串可以正常工作

0 个答案:

没有答案