Are there any Tutorials/Guides for JSON?


Are there any guides on using JSON files effectively for Playdate? I find the SDK documentation leaves me wanting with figuring out how to handle JSON data in Lua.

Currently, I’m working on creating a monster tamer style game. Because of how data rich monster tamers are in general, using JSON seems the best way to go.

Should I develop a base class and just have the SDK output a JSON file of its data structure to use as a template? Or are there independent tools out there for converting Lua tables to JSON and vise versa?

Try taking a look at the playdate.datastore APIs - they handle the JSON details under the hood... you just read and/or write tables from/to disk in one go.

1 Like