Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JSON Parse Error - Malformed Description Field with Unescaped JIRA Markup

Sourabh Gandhi
May 22, 2026

Category: JIRA REST API

Description:

I'm experiencing a JSON parsing error when consuming the JIRA REST API (`/rest/api/2/search`) due to malformed JSON in the response. The issue appears to be related to JIRA wiki markup (`{code:java}`) containing JSON-like content in the `description` field that is not properly escaped.

Error Details

JSONDecodeError: Expecting ',' delimiter or '}': line 1 column 2244235 (char 2244234)

API Request

GET /rest/api/2/search/jql?fields=*all&expand=changelog,transitions&validateQuery=strict&jql=updated >= '2019-01-01 00:00' order by updated asc

Problematic Response Structure

The issue occurs in the changelog history where the `description` field contains:

"description": "{code:java}{\"errorMessages\":[\"Invalid request payload. Refer to the REST API documentation and try again.\"]}"

This appears to be JIRA wiki markup (`{code:java}`) wrapping a JSON error message, but the quotes within are not escaped, breaking the JSON parser at the outer level.

Environment


- JIRA Type: Cloud (Atlassian)
- API Version: v2

Questions

1. Is this a known issue with how JIRA escapes content in description/changelog fields when they contain wiki markup with JSON-like content?

2. Is there a workaround to request these fields in a format that's guaranteed to be valid JSON (e.g., using `renderedFields` instead of raw fields)?

3. Should the API be escaping these special characters differently, or is there a content policy that prevents this type of data?

 

Any guidance on how to reliably retrieve all issues including those with complex description content would be greatly appreciated!

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events