How do I go from atlas_doc_format to JSON?

When I try to get the body of a page in atlas_doc_format using the V2 API, I get something like:

"body": {
    "atlas_doc_format": {
      "value": "{\"type\":\"doc\",\"content\":[{\"type\":\"extension\",\"attrs\":{\"layout\":\"default\",\"extensionType\":\"com.atlassian.ecosystem\"

Etc. As you can see, the data for value: is a large string which contains some sort of ‘escaped’ JSON. In Forge, how do I turn that into usable JSON?

It is serialized JSON. Use JSON.parse()

1 Like