![]() |
不拘小节的口罩 · Java 中使用 Jersey ...· 1 年前 · |
![]() |
酒量大的篮球 · ORA-01654错误-腾讯云开发者社区-腾讯云· 1 年前 · |
![]() |
拉风的勺子 · 如何使用sed删除文件的最后n行 - 问答 ...· 2 年前 · |
![]() |
喝醉的小笼包 · 全球降水数据集介绍_cmap降水资料_忠言睿 ...· 2 年前 · |
![]() |
健壮的芹菜 · chrome ...· 2 年前 · |
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...!