Re: how to create a list in easyJSON

2017-01-08 Thread pink via use-livecode
scribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > ___ > use-livecode mailing list > use-livecode@.runrev > Please visit this url to subscribe, unsubscr

Re: how to create a list in easyJSON

2017-01-08 Thread pink via use-livecode
) into jsonOutput -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/how-to-create-a-list-in-easyJSON-tp4711279p4711513.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing

Re: how to create a list in easyJSON

2017-01-07 Thread Matt Maier via use-livecode
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 t

Re: how to create a list in easyJSON

2017-01-03 Thread Bob Sneidar
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 __

Re: how to create a list in easyJSON

2017-01-02 Thread J. Landman Gay
On 1/1/17 12:31 PM, pink wrote: what version of easyJSON are you using? I just copied the library from: https://github.com/luxlogica/easyjson/blob/master/easyjson.lc used this code: put "12345" into tArray["one"][1] put "12345" into tArray["one"][2] put "12345" into tArray["one"][3]

Re: how to create a list in easyJSON

2017-01-01 Thread pink
check the script... there should be a function: isNumericalArray this is the function which appears to be either not there, or is not functioning correctly -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/how-to-create-a-list-in-easyJSON-tp4711279p4711304.html

Re: how to create a list in easyJSON

2017-01-01 Thread Matt Maier
ot;12345" into tArray["two"][2] >put jsonfromarray(tArray) into tWhatever > and got: > {"one":[12345,12345,12345],"two":[12345,12345]} > > > I still recommend fastJSON over easyJSON: > https://github.com/bhall2001/fastjson/blob/master/fastjson.lc

Re: how to create a list in easyJSON

2017-01-01 Thread pink
N over easyJSON: https://github.com/bhall2001/fastjson/blob/master/fastjson.lc -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/how-to-create-a-list-in-easyJSON-tp4711279p4711302.html Sent from the Revolution - User mailing list archive at Nabble.com. __

Re: how to create a list in easyJSON

2016-12-31 Thread Mark Wieder
On 12/30/2016 05:27 PM, Matt Maier wrote: I'm trying to send a list of strings to an API. Best I can tell it's interpreting the entire list as one string. Is there a way to send data to easyJSON such that it returns a JSON list of strings instead of one monolithic string? For example, I've got

Re: how to create a list in easyJSON

2016-12-31 Thread Richard Gaskin
Matt Maier wrote: > This code: > >put "12345" into tArray["one"][1] >put "12345" into tArray["one"][2] >put "12345" into tArray["one"][3] >put "12345" into tArray["two"][1] >put "12345" into tArray["two"][2] >put jsonfromarray(tArray) into tWhatever > > gives me this resul

Re: how to create a list in easyJSON

2016-12-31 Thread Matt Maier
g numeric keys > > so: > array[one][1] = 12345 > array[one][2] = 12345 > array[one][3] = 12345 > array[two][1] = 12345 > array[two][2] = 12345 > > would produce the results you are looking for (technically the numbers > don&#x

Re: how to create a list in easyJSON

2016-12-31 Thread pink
as to be that all of the keys must be numeric) -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/how-to-create-a-list-in-easyJSON-tp4711279p4711289.html Sent from the Revolution - User mailing list archive at Nabbl

Re: how to create a list in easyJSON

2016-12-31 Thread Richard Gaskin
Matt Maier wrote: ... > when what I'm trying to get is more like this > > {"one":["12345","12345","12345"],"two":["12345","12345"]} Let's look at the other side of that and see if we can find a good round-trip solution: What would the string you have above look like in a LiveCode array? --

Re: how to create a list in easyJSON

2016-12-30 Thread Matt Maier
put "12345,12345,12345" into tArray["one"] put "12345,12345" into tArray["two"] split tArray["one"] by comma put jsonfromarray(tArray) into tWhatever result {"one":{"3":12345,"1":12345,"2":12345},"two":"12345,12345"} So looks like that just created an array with a numeric index, whic

Re: how to create a list in easyJSON

2016-12-30 Thread Andre Garzia
Try placing a: Split tArray[one] by comma Before converting to json. Om om Andre Ps: typing on the phone, sorry for my brevity Em 30 de dez de 2016 15:29, "Matt Maier" escreveu: > I'm trying to send a list of strings to an API. Best I can tell it's > interpreting the entire list as one stri

how to create a list in easyJSON

2016-12-30 Thread Matt Maier
I'm trying to send a list of strings to an API. Best I can tell it's interpreting the entire list as one string. Is there a way to send data to easyJSON such that it returns a JSON list of strings instead of one monolithic string? For example, I've got something like this: array[one] = 12345,123