![]() |
俊逸的萝卜 · 【Endnote ...· 10 月前 · |
![]() |
谦逊的茴香 · C++正则表达式校验某个字符串是否是合格的e ...· 11 月前 · |
![]() |
耍酷的抽屉 · 2022年推荐给Web开发人员的十大VSCo ...· 1 年前 · |
![]() |
朝气蓬勃的油条 · org.springframework.we ...· 1 年前 · |
![]() |
阳光的楼房 · python 3.x 分析日志的模块(正 ...· 1 年前 · |
Give a try with the replace method on the output that you are receiving before processing it further.
Use this method -
String transformedText = ParserOutput.replace('""', '"');
Here ParserOutput is the string that contains the output to be transformed.
Thanks
All Answers
So your example would look like this:
"compannyName":"\"schiing\" Immobien & Co Lingasse KG"
PFB my JSON Output :
"mfr_part_number_mfrpn": ""PROMINENT,
BT5B0713P"
So my issue is if I have "Double Quotes" in my Out from DB then it is throwing me exceptions like
System.JSONException: Unexpected character ('P' (code 80)): was expecting comma to separate OBJECT entries at input location
Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at input location
System.JSONException: Unexpected character ('R' (code 82)): was expecting double-quote to start field name at input location
So bacically i want some workaround to delete off the Double quote in my Output and the above should become like :
"mfr_part_number_mfrpn": "PROMINENT,
BT5B0713P"
Give a try with the replace method on the output that you are receiving before processing it further.
Use this method -
String transformedText = ParserOutput.replace('""', '"');
Here ParserOutput is the string that contains the output to be transformed.
Thanks
Awesome my issue got solved...!