JSON is a perfectly good way to do this, but so is a Lua file. Here’s a snippet from my game:
local M = {} M[1] = { droneType = 1, droneMovement = "straight", spawnSpeed = 3000, spawnCount = 20, bossType = 1, microDroneType = 0, microDroneMovement = "straight", microDroneSpawnPattern = "wall", spawnHealthRate = 20000, spawnPickupRate = 30000, energyChance = 100, freezeChance = 0, toxicChance = 0, nukeChance = 0 } M[2] = { droneType = 2, droneMovement = "sweep", spawnSpeed = 2750, spawnCount = 20, bossType = 2, microDroneType = 0, microDroneMovement = "straight", microDroneSpawnPattern = "wall", spawnHealthRate = 20000, spawnPickupRate = 30000, energyChance = 98, freezeChance = 2, toxicChance = 0, nukeChance = 0 } M[3] = { droneType = 3, droneMovement = "seek", spawnSpeed = 2500, spawnCount = 20, bossType = 1, microDroneType = 0, microDroneMovement = "straight", microDroneSpawnPattern = "wall", spawnHealthRate = 20000, spawnPickupRate = 30000, energyChance = 96, freezeChance = 4, toxicChance = 0, nukeChance = 0 } M[4] = { droneType = 0, droneMovement = "", spawnSpeed = 3000, spawnCount = 20, bossType = 2, microDroneType = 1, microDroneMovement = "straight", microDroneSpawnPattern = "wall", spawnHealthRate = 20000, spawnPickupRate = 30000, energyChance = 94, freezeChance = 6, toxicChance = 0, nukeChance = 0 } M[5] = { droneType = 0, droneMovement = "", spawnSpeed = 3000, spawnCount = 0, bossType = 9, microDroneType = 1, microDroneMovement = "straight", microDroneSpawnPattern = "wall", spawnHealthRate = 20000, spawnPickupRate = 30000, energyChance = 94, freezeChance = 6, toxicChance = 0, nukeChance = 0 } ... return M
In here I store the enemy for that level (droneType). I have a different table to managing the backgrounds, but I store the file names of the background
Rob