Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to convert jira response into html

Abdul Qadir
Contributor
July 4, 2022

I am new to Jira API, I am facing an issue when I get data from Jira GET API it returns me a description in JSON form data  How can I convert it into working HTML, 

 

Same as when I post some HTML how to convert that HTML into working JSON for JIRA, 

 

here is the response 

 

"description": {
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "this is "
},
{
"type": "text",
"text": "Bold ",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": "and "
},
{
"type": "text",
"text": "italic",
"marks": [
{
"type": "em"
}
]
},
{
"type": "text",
"text": " Text to check how "
},
{
"type": "text",
"text": "website ",
"marks": [
{
"type": "textColor",
"attrs": {
"color": "#36b37e"
}
}
]
}
]
},

1 answer

1 accepted

2 votes
Answer accepted
Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 4, 2022

@Abdul Qadir The JIRA API is a rest endpoint that post and post-back responses use JSON.  To convert them to or  from HTML you will need to write something in your application to do that.  

Abdul Qadir
Contributor
July 5, 2022

@Brant Schroeder thank you so much for the information. Is there any prebuild library or something that will help me convert this? I have little experience in PHP. 

 

thanks again 

Like Abdul likes this
Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 5, 2022

@Abdul Qadir I am not familiar with a specific library in PHP that you could use.  It should not be hard to create your own parser since the JSON objects should be the same so you could reuse your own function.  

Like # people like this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events