It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Setting the background of a cell in a table using the rest API

I'm currently trying to set the background of a specific cell to red, but am generating:
No JSON object could be decoded


The request I send in is:

{"type":"page","title": "Comparison","ancestors":[{"id":122755880}], "space":{"key":"aaaa"},"body":{"storage":{"value": "<h1>Categories</h1><h2>Miscellaneous Categories</h2><table><tr><td><strong>Category</strong></td><td><strong>Duration (MM:SS)</strong></td><td><strong>Duration (MM:SS)</strong></td></tr><tr><td>File System Creation</td><td>0:52 </td><td class="highlight-red" data-highlight-colour="red" title="Background colour : Red"> 0:26</td></tr></table>", "representation":"storage"}}}


1 answer

0 votes
Davin_Studer Community Leader Dec 03, 2019

To me it looks like you have not escaped out the quote marks in the page content. You need to escape those out or the first quote mark it comes across it will believe ends the opening one for the storage value, which will make the rest of the stuff you have invalid JSON.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

How is your team having fun and bonding, remotely, utilizing Confluence?

Thanks everyone for answering last week’s question. The winner of the random drawing from those who commented is: @LarryBrock I’ll contact you separately with your prize details. This wee...

283 views 9 7
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you