Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
gdevelop5:all-features:network [2018/10/15 23:40]
valiant_curiosity [Variable to JSON]
gdevelop5:all-features:network [2019/01/19 19:28]
4ian
Line 46: Line 46:
 Structures are useful as they can store all the data concerning something, that can then be sent to a server. To do this, you can convert the structure variable to JSON, using the expression called `ToJSON`. For example: Structures are useful as they can store all the data concerning something, that can then be sent to a server. To do this, you can convert the structure variable to JSON, using the expression called `ToJSON`. For example:
  
-`ToJSON(Progress)`+``` 
 +ToJSON(Progress) 
 +```
  
 If the Progress variable has a children "​Level"​ with value 4 and "​Score"​ with value 1500, the resulting JSON will be: `{"​Level":​ 4, "​Score":​ 1500}`. If the Progress variable has a children "​Level"​ with value 4 and "​Score"​ with value 1500, the resulting JSON will be: `{"​Level":​ 4, "​Score":​ 1500}`.