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
) 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
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
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
__
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]
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
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
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.
__
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
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
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
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
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?
--
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
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
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
16 matches
Mail list logo