Q:

Bookmarklet to read json in browser

I have a REST API exposed by a legacy internal service.
There's one particular GET call that I want to automate for myself - it returns JSON and I want to click a bookmarklet and read that json and navigate to another window - essentially building an add-on navigation for UI-less API.
Q: How do I get the raw content of the current page when it's not HTML
I tried making a bookmarklet, but I can't figure out how to get the json that's loaded on my page:
javascript:(function()%7Balert(document.textContent)%7D)()

shows "null", when I expect it to repeat the text I see in the browser.
The GET request is just a normal REST API request:
http://my-service-domain.app/api/items/123

when I put it in the browser it shows the json
{
  Id:"123",
  NextId: "234",
  SomeOtherStuff: "blah"
}

and I want to click the bookmarklet to navigate to
http://my-service-domain.app/api/items/234

A:

Get it from the body:
document.body.textContent

