PROPERLY DOWNLOAD & LOAD ARRAYS AS JSON

Get help using Construct 2

Post » Tue Nov 22, 2016 9:25 pm

After downloading an array in JSON format, the "load" action cannot read exactly what was downloaded b/c of several issues w/ the JSON. How do I manipulate the JSON so it may be loaded & read properly?
B
7
S
2
Posts: 14
Reputation: 512

Post » Wed Nov 23, 2016 10:02 am

The Array.AsJSON string, it is literally all you need.

Perhaps your issue lies with the quotes.
If you are copying the string given from the .asJSON string (something like :
Code: Select all
{"c2array":true,"size":[10,1,1],"data":[[[7]],[[3]],[[9]],[[2]],[[5]],[[5]],[[2]],[[8]],[[3]],[[7]]]}


You need to put that line between the quotes when loading JSON values in the array and double the existing quotes within the line.

=>
Code: Select all
"{""c2array"":true,""size"":[10,1,1],""data"":[[[7]],[[3]],[[9]],[[2]],[[5]],[[5]],[[2]],[[8]],[[3]],[[7]]]}"
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
289
S
112
G
94
Posts: 7,333
Reputation: 69,293

Post » Wed Nov 23, 2016 6:42 pm

awesome, thanks.
B
7
S
2
Posts: 14
Reputation: 512


Return to How do I....?

Who is online

Users browsing this forum: AndreasR, Google [Bot], HellMax, tarek2 and 12 guests