how to create a list in easyJSON

pink nabble at mad.pink
Sun Jan 8 10:02:12 EST 2017


In the most recent version of easyJSON, numeric keyed arrays will turn into
JSON arrays, older versions may vary. 

fastJSON does this by default, but it can be overridden by passing true into
the keepNumeric parameter: 
arrayToJson(pArrayData, keepNumeric) 

for example: 
put arrayToJSON(inputArray,true) into jsonOutput 


hh via use-livecode wrote
> As a warning for others, fastJSON is not directly interchangeable with
> easyJSON.
> 
> I'm using a big array that has a couple levels of numeric keys before you
> get to the text keys. When fastJSON converts the array to JSON it throws
> out the numeric keys and just turns everything into a list.
> 
> I don't think that would actually be a problem, except that in my data
> structure the [0] key has important metadata in it and when fastJSON
> converts back from JSON to an array it doesn't start counting at 0, so all
> of the data comes back but it's offset.
> 
> At least, this is the newest version of fastJSON from github and some old
> version of easyJSON that I've had around for a long time (not sure what
> version it is).
> 
> On Tue, Jan 3, 2017 at 8:05 AM, Bob Sneidar <

> bobsneidar@

> >
> wrote:
> 
>> Hmmm... all of this may explain why a table in a PDF fillable form breaks
>> the controls out as columns, not records. So when populating an FDF file,
>> my data needs to have each column in it's own variable, or else I have to
>> do nested repeats to place it all correctly.
>>
>> Bob S
>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> 

> use-livecode at .runrev

>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
> _______________________________________________
> use-livecode mailing list

> use-livecode at .runrev

> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/how-to-create-a-list-in-easyJSON-tp4711279p4711515.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list