|
|
大鼻子的热带鱼 · 关于罗永浩、郑刚撕逼的这件事 ...· 6 月前 · |
|
|
乖乖的啄木鸟 · 综合科-榆林市第五医院· 10 月前 · |
|
|
深情的登山鞋 · 小鱼海棠怎么那么多黑粉-抖音· 1 年前 · |
|
|
爱吹牛的棒棒糖 · 革命文物修复伤痕里的热血芳华 _中国经济网― ...· 1 年前 · |
|
|
仗义的柳树 · Unity: “该行为上引用的脚本(未知)丢失!”· 1 年前 · |
For example {"name" : "VALUE \" has Quotes\" in it"}
\" Double quote
\\ Backslash caracter
Share the JSON string pls
Thanks
AR
&
For Unexpected character ('T' (code 84)): was expecting comma to separate OBJECT entries at input location :
"description_maktx": ""PmpAcc,Cable,LMI,26034-20,20FTEXT""
"description_maktx": ""PmpAcc,Cable,LMI,26034-20,20FTEXT""
but it should be
"description_maktx": "\"PmpAcc,Cable,LMI,26034-20,20FTEXT\""
so you have to use \" for Double quote.
Hi Sushma,
Replace the two double quotes with single double quotes using the following method -
String transformedText = ParserOutput.replace('""', '"');
Here ParserOutput is the string that contains the output to be transformed.
This should make the output as
"description_maktx": "PmpAcc,Cable,LMI,26034-20,20FTEXT"
Thanks
If the reply solves your problem then please mark it as best answer.
I have already tried this Solution as suggested by you : finaloutput = finaloutput.replace('""','"');
It did solve some of my JSON parisng exceptions but not completely.
Hi Balaji,
If a escape the front double quotes by : finaloutput = finaloutput.replace('""','"\"');
then how shall i replace it for the double quotes at the end of my String...?
Please help...
Also is JSON Encoding and Decoding possible in Apex...
I need some permanent solution to fix this issue...
Temporary (and not complete) fix would be
finaloutput = finaloutput.replaceAll('""','"\"');
finaloutput = finaloutput.replaceAll('""','"\"');