0 Favourites

How do I Use JSON?

  • 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??

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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]

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)