Does json work on mobile?

I’m deciding on what saving system I should use for my game.

The game will be iOS and Android, and the options that I know are: Json and PlayerPref

I need to store quite a lot of different variables, so Json would probably be better.

So my question is, does Json work on mobile?

yes. and Unity includes a way to handle json if you dont want to find a different source. Unity’s version works pretty well for free.

I’m looking at tutorials right now, and it dosen’t seem to be TO complicated, now if only my data wasen’t complicated…

JSON is a data format for serialisation, not a way of saving the game. It’s not really comparable to player prefs.

Saving is a three step process.

  • Gather the data to be saved
  • Serialise the data
  • Save the serialised data

Step one is very game dependent, so general advice won’t help.

Step 2 is where JSON comes in. Other common methods include XML, binaryformatters and csv. The idea is to convert C# variables into something savable.

Step 3 is where player prefs come in. Other methods include local files, servers, or sometimes just placing the data on screen for the user to copy paste.

Point is JSON doesn’t actually save your data. It just gets your data to a point that it can be saved. Think of it as the words to a story, you also need something to write the words on. So you still have to dump the JSON to player prefs, a web server, a file, or something.