Malformed JSON response in document.type request

Hello, I'm getting malformed JSON responses when querying a specific page,[[at(document.type, "drinks")]] (this is the actual response, i.e. it is broken after the 'results' property):


This has occurred to people in other threads where they have links to documents that were removed, but this type doesn't have any links, just slices of text-based content.

Requesting data for other content types works. This content is fetched properly when viewing it in your API browser under the HTML format but displays an error when viewing it in the JSON format.

I'm using Nuxt.js but I've isolated this issue to something on your end or with my content (e.g., bad characters somewhere?) so I've posted it in the REST API forum -- I'm wondering if your team might have any ideas what is going on?

Hi Matt,

Welcome to the Prismic community.

Well clearly the problem is at our end, it might be caused by some special character is breaking the JSON construction in our backend as you said.

I have been able to reproduce the issue and I will create an issue in our tracker to have somebody from our dev team to work on it, and we will let you know once we get some info.


1 Like