Pros & Cons when converting HTML β JSON Rich Text for a blog detail page
I am working on a blog detail page and currently the content is coming from the API as HTML . . .i am thinking of converting the HTML into a structured JSON so i can render using structured content . To give more context i literally want to go from : <p>This is some text</p>
<h2>Heading</h2>
<blockquote><p>Quoted text</p></blockquote>to : {
"nodeType": "document",
"content": [
{
"nodeType": "paragraph",
"content": [
{
"nodeType": "text",
"value": "This is some text",
"marks": [],
"data": {}
}
],
"data": {}
},
{
"nodeType": "heading-2",
"content": [
{
"nodeType": "text",
"value": "Heading",
"marks": [],
"data": {}
}
],
"data": {}
}
]
}The only thing that will affect SEO is the resulting HTML structure of your page . Converting WYSIWYG HTML to JSON is a great approach for making sure you have flexibility is presenting the information on the page . CMSs like Contentful provide this type of API response for rich text content for these reasons . Definitely a reasonable option ! Just make sure that the structured content on the page matches the specification . You can test your structured content output using https://developers.google.com/search/docs/appearance/structured-data (I assume you mean the structured content usually presented in script tags as JSON format for things like google rich results ) Basically i am trying to see the possibility of using the Toddle way of handling blog detail page rendering from this : https://toddle.dev/projects/toddle_blog_template/branches/main/components/Blog%20Article?rightpanel=attributes&canvas-width=1236.8&canvas-height=1779.3 The only thing is that my content is not coming from Contentful . .it is coming from Xano as HTML . . . Reason why i asked if it makes sense to first convert the HTML into a contentful like structure then render the elements