Commit graph

5 commits

Author SHA1 Message Date
Julian Bouzas
9f2168e022 spa-json: add _add_from_string() and _add_from_stringn() builder APIs 2023-04-17 07:47:09 -04:00
Ashok Sidipotu
229f5d0630 spa-json: add _is_container () API 2023-04-17 07:44:19 -04:00
Julian Bouzas
0996f5a5ca spa-json: add wp_spa_json_to_string() API
Since the string length returned by wp_spa_pod_get_data() does not always match
the size of the actual json object because it is stored in contiguous memory, we
cannot always rely on that API to get the json string data.

The new wp_spa_pod_to_string() always allocates a new string with the same
length as the json size, guaranteeing that the string returned always represents
the json object, regardless of whether it is nested or not. It is always
recommented to use wp_spa_pod_to_string() unless you know what you are doing.
2022-06-27 10:07:16 +00:00
Julian Bouzas
e9be326954 spa-json: add _new_from_stringn() API 2022-03-24 04:35:12 -04:00
Julian Bouzas
4c1574117a spa-json: add new WpSpaJson API 2022-01-25 07:20:35 -05:00