需要加 "\" 号
String paramJson = "{\n" +
" \"req_data\": {\n" +
" \"text\": \"222\\n\",\n" +
" \"image_ids\": [],\n" +
" \"mentioned_user_ids\": []\n" +
" }\n" +
"}";
直接用json会报错
String paramJson = "{
"req_data": {
"text": "222\n",
"image_ids": [],
"mentioned_user_ids": []
}
}"

2763

被折叠的 条评论
为什么被折叠?



