Sonali Gupta
Sonali Gupta

Reputation: 514

Json toString output for "/"

I get a JSON response, which I parse. Then populate in a POJO. Do some work on it and finally sysops json.toString instead of printing the content of the POJO. I am using json.toString() and in the response I get "currentTime":"08\/12\/2020 02:07:31 PM PDT" which is basically using \ for escaping / but for the final output I dont want this on the console. I can only use Json simple library.

Upvotes: 0

Views: 90

Answers (1)

p4czyk
p4czyk

Reputation: 11

Maybe try to replace those '/' with ' ' (space). Then you would have a reformatted string. 👨‍💻✌

Or replace it with whatever you just want. 😉

Upvotes: 0

Related Questions