2

I have a string that looks like this..

"Message" : "{\"eventType\":\"DataChanged\",\"operation\":\"create\"}"

Is there any library in Java that can convert this to the string below so I can then parse it into a json object

"Message" : {"eventType":"DataChanged","operation":"create"}
user1066568
  • 717
  • 3
  • 15
  • 32
  • 1
    Your JSON parser can. The value of Message is a string. You can parse this string as JSON. – JB Nizet Jun 20 '19 at 08:38
  • You can use Fasterxml library to parse this string to JSON – Nitin Zadage Jun 20 '19 at 08:40
  • Have you used JObject.Parse({string}) ? – papaya Jun 20 '19 at 08:40
  • Probably not. The first one doesn't look right. Some of your quote marks (`"`) are escaped and some aren't. If that's the _content_ of your `String`, then it's not valid json. If that's the _declaration_ of your `String` then it's not a valid `String`. – BeUndead Jun 20 '19 at 08:53

0 Answers0