JSON viewer support is a great addition to Edge. One thing I would like to see is to expose the json content as a variable on DevTools console.
As a workaround, I tried the following on the console, which works for smaller outputs (smaller than the visible page):
json = JSON.parse(document.getElementsByClassName("cm-content")[0].innerText)
However, it seems for bigger JSONs (when scrollbar exists), the page is rendered as we scroll it, not allowing to read the entire json and giving the error Unexpected end of JSON input at JSON.parse
JSON viewer support is a great addition to Edge. One thing I would like to see is to expose the json content as a variable on DevTools console.
As a workaround, I tried the following on the console, which works for smaller outputs (smaller than the visible page):
json = JSON.parse(document.getElementsByClassName("cm-content")[0].innerText)
However, it seems for bigger JSONs (when scrollbar exists), the page is rendered as we scroll it, not allowing to read the entire json and giving the error
Unexpected end of JSON input at JSON.parse
Originally posted by @c4ldas in https://github.com/MicrosoftEdge/DevTools/issues/87#issuecomment-1692892102
AB#46169933