LC8 - Stumbling into JSON

Peter W A Wood peterwawood at gmail.com
Mon Jun 13 19:36:21 EDT 2016


Mark 

> On 14 Jun 2016, at 07:19, Mark Wieder <mwieder at ahsoftware.net> wrote:
> 
> And just FYI, for comparison the xml translation of that would be
> 
> <json_object_in_xml>
>  <result>
>    <value>18.75</value>
>    <units>kg/m at 2</units>
>  </result>
>  <request_fields>
>    <height_in_m>2</height_in_m>
>    <weight_in_kg>75</weight_in_kg>
>  </request_fields>
> </json_object_in_xml>
> 

Wouldn’t an XML purist come up with the following, making it much more time consuming to process?

<json_object format=“xml">
 <result units="kg/m at 2">
   <value>18.75</value>
 </result>
 <request_fields>
   <height units=“metres">2</height>
   <weight units=“kg">75</weight>
 </request_fields>
</json_object>

Regards

Peter






More information about the use-livecode mailing list