Is there a way to put quotation marks inside a json of a json?

Viewed 39

I have a Json which contains another Json as a string. I am already able to read the inner Json and getting its contents.

My Json currently looks like this:

[
  {
    "fullName": "FullNameTest",
    "dataType": 3,
    "configuration": "[{\"IPAddress\": \"123.123.123\",\"Node\": \"my'node'path'is'here'\"}]"
  }
]

As you can see, the second Json is inside of "configuration". The second parameter called "Node" contains a node path which is currently seperated by " ' ". The problem is that I need to replace this with quotation marks because my code will not work otherwise. I also cannot do anything against that.
I am currently replacing the " ' " with some code but I don't think that is a pretty solution.

1 Answers

You can escape it twice, like this:

\\\"text\\\"
Related