I am having an online app constructed on wordpress, and am needing to construct a cellular app with it. The in all probability most necessary side of that is that I am going to want to rework all of my AJAX request-responses to the standard JSON-format, to be simply appropriate with different APIs / Frameworks used to construct cellular apps.
Most of that is carried out with wordpresses’ native REST API, besides concerning my customized publish sorts. These all have a standardized construction; sth like:
<div class="post-content-wrapper">
<p class="post-info-1">First Information</p>
<p class="post-inof-2">Second Information</p>
</div>
What I am thus pondering of is the transformation of this publish content material into JSON, one thing like:
{
'info_1':'First Information',
'info_2':'Second Information'
}
After which render the whole lot on the client-side (e.g. for net utilizing HTML templates and native Js (I need to chorus from frameworks if not completely wanted), and for respective different options of cellular app frameworks).
In idea, each the wp_posts
desk’s post_content
area (which is the place wp publish contents are saved), in addition to the wp_postmeta
desk’s meta_value
area (which is the place meta values of wp posts are saved) are of kind longtext
; that means they might simply each maintain JSON (I am utilizing MariaDB, so LONGTEXT
is handled equally as JSON
).
As this doesn’t appear to be a default chance in WP, I puzzled if it might really be an issue for some purpose to retailer publish contents / publish meta values within the JSON format.
Might anybody consider a purpose why it may very well be unhealthy observe?