An array of object would be turned into a multidimensional  array with value 
pairs in LiveCode. Depending on the source the main keys may be numeric or 
assosiative, like in these examples:

contriesArray[1][name]
contriesArray[1][capitol]
contriesArray[1][inhabitants]

Or 

contriesArray[«Norway"][capitol]
contriesArray[«Norway»][inhabitants]

Tore


> 15. aug. 2023 kl. 15:46 skrev Dar Scott via use-livecode 
> <[email protected]>:
> 
> Thanks, Tore!
> 
> I found these in the dictionary. For JsonImport I noted this:
> 
> The return value may be any of the following types, depending on the content 
> of the file:
> 
> Array (for a JSON object)
> List (for a JSON array)
> String (for a JSON string)
> Number (for any JSON number)
> Boolean (for JSON true or false)
> nothing (for JSON null)
> How would an array of objects be translated? What is nothing?
> 
> Dar
> 
> 
>> On Aug 14, 2023, at 10:58 PM, Tore Nilsen via use-livecode 
>> <[email protected]> wrote:
>> 
>> JsonImport will make an array of your JSON data, whereas JsonExport will 
>> turn your array into JSON data. Not much fiddling there.
>> 
>> Best regards
>> Tore Nilsen
>> 
>>> 15. aug. 2023 kl. 02:07 skrev Dar Scott via use-livecode 
>>> <[email protected]>:
>>> 
>>> 
>>> I’m about write some scripts that fiddle with JSON. I have some old stacks 
>>> of mine about someplace. But, I got to thinking there might be something 
>>> faster about someplace. Ideas?
>>> 
>>> Dar
>>> _______________________________________________
>>> use-livecode mailing list
>>> [email protected]
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> [email protected]
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> 
> _______________________________________________
> use-livecode mailing list
> [email protected]
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
  • JSON Dar Scott via use-livecode
    • Re: JSON Tore Nilsen via use-livecode
      • Re: JSON Richmond Mathewson via use-livecode
      • Re: JSON Dar Scott via use-livecode
        • Re: JSON Tore Nilsen via use-livecode

Reply via email to