How do I Use JSON?

Get help using Construct 2

Post » Sat Sep 06, 2014 11:19 am

First is What is JSON? and how to use it? I searched all over the forums but nothing was found! I think that JSON is maybe to store data online & load them to all people who uses a game ( like a global highscore for example) am I right??
ImageImageImageImageImage
B
56
S
15
G
5
Posts: 852
Reputation: 11,431

Post » Sat Sep 06, 2014 12:39 pm

JSON is a type of data base uses string to storing.

My debuging window for sorting file:

[attachment=1]2014-09-06_143236.png[/attachment]

As u see, there is a typical JSON structure saved in local webstorage object (named arrayWebstorageExample). Translating:

c2array: "true" - conversion to array: true; it means ok, do that conversion
size: 5- set size of that array to 5 cells
data: they are ALL string, so converstion to int or float is needed

JSON can be stored also on the server in internet.

EDIT:// Example of using JSON, for more, see documentation and tutorials on scirra. com. Placing more than two attachments crash an post viewer, heh.... Just click "Open in new tab" to see images

[attachment=0]2014-09-06_143941.png[/attachment]
You do not have the required permissions to view the files attached to this post.
B
3
Posts: 9
Reputation: 193


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, facecrime and 10 guests