http://localhost/v1/documents?format=json&uri=%2Fdocs%2F1234.json
It looks like this URL is giving us XML instead of JSON which is causing some issues.
I believe this started happening once we upgraded to Marklogic 8.
You can see we are specifying json which seems right based on this: https://docs.marklogic.com/REST/GET/v1/documents
How do I get this to return JSON?
In MarkLogic 6 and 7, JSON documents were represented internally as XML, that being the standard hierarchical document format supported in those versions. Access through the REST API was transparently JSON for read & write, it was just different under the hood. In MarkLogic 8, JSON is a native format, so the transformations went away. MarkLogic's Support team has an article about how JSON is handled in versions 6, 7, and 8 -- that should help you.