# Discourse AI: structured output response was not valid JSON

**URL:** https://meta.discourse.org/t/discourse-ai-structured-output-response-was-not-valid-json/408821
**Category:** Support
**Tags:** ai
**Created:** [July 29, 2026, 2:11pm UTC](https://meta.discourse.org/t/discourse-ai-structured-output-response-was-not-valid-json/408821 "2026-07-29T14:11:05Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![lilydjwg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilydjwg/32/515838_2.png) [@lilydjwg](https://meta.discourse.org/u/lilydjwg)
#### Post date: [July 29, 2026, 3:53pm UTC](https://meta.discourse.org/t/discourse-ai-structured-output-response-was-not-valid-json/408821/4 "2026-07-29T15:53:28Z")

</div>

To illustrate, the following _is_ valid JSON:

```json
{
  "key": "value"
}

```

The following is an escaped one, which is invalid and causing the issue:

```JSON
{\u000a "key": "value"\u000a}

```

---

_[View the full topic](https://meta.discourse.org/t/discourse-ai-structured-output-response-was-not-valid-json/408821)._
