LC8 - Stumbling into JSON

Graham Samuel livfoss at mac.com
Tue Jun 14 15:38:17 CEST 2016


Thanks Mike, and thanks to everyone else who explained. My query about ‘result’ and ‘value’ wasn’t about arrays as such, it was about the use of those particular labels in that context - the answer is (I suppose) that one has to know the spec of the JSON that is being used in order  to know what the JSON output looks like (and indeed what the function does). 

I have no idea how the LC people found the JSON-outputting BMI calculation but I suppose they just Googled it like everyone else. Obviously it would be nice to be more familiar with sources of such functions (that’s what they are really, isn’t it? Just web-based functions that output JSON). I guess I will gradually become more familiar with that world, since it seems immensely useful, provided of course one can believe that any given function is trustworthy.

Cheers

Graham

> On 14 Jun 2016, at 14:09, Mike Kerner <MikeKerner at roadrunner.com> wrote:
> 
> Graham,
> The syntax you are asking about is array syntax.  There are two axes in
> this particular array.  They are called "result" and "value".  The "round"
> is rounding the value to clean up the decimals.
> JSON is a web data standard.
> 
> On Mon, Jun 13, 2016 at 7:46 PM, Mark Wieder <mwieder at ahsoftware.net> wrote:
> 
>> Peter W A Wood <peterwawood at ...> writes:
>> 
>>> Wouldn’t an XML purist come up with the following, making it much more
>> time
>> consuming to process?
>> 
>> Yes, I was by no means suggesting doing this in xml.
>> Just a hint as to meaning in case the json format was inscrutable.
>> I think xml is only slightly more readable than csv.
>> Or perl.
>> 
>> --
>> Mark Wieder
>> ahsoftware at gmail.com
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> 
> 
> 
> -- 
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>   and did a little diving.
> And God said, "This is good."
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list