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??
Posts: 852
Reputation: 11,611

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:


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

You do not have the required permissions to view the files attached to this post.
Posts: 9
Reputation: 193

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 15 guests