Jonas Cristens Jonas Cristens - 1 year ago 165
JSON Question

Automatically remove quotes in JSON string Java

I extract data from a website in JSON format. When I try to parse a JSON with quotes in the body it gives me the following error.


Does anybody know how I can automatically remove the quotes (the quotes around "Equity Put") in the string without removing the other quotes (like in "body").

In this example in the string of the body field the " in "Equity Put" gives the error.

{"body":"ChOTD-11/3/16 CBOE "Equity Put":Call Ratio / ISEE Call:Put Ratio Hits Extreme > 1.00 $SPY $SPX"}

Answer Source

"Equity Put" should have been \"Equity Put\". Those quotes should have been what is called escaped, or otherwise, the string ends right before the word Equity.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download