Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

No, this is really good - I use JSON all the time, but I usually just let the tail wag the dog and structure the JSON based on what I want it to deserialize as. I'm using libgdx, which has its own json wrapper for dealing with serialization and deserialization, and also its own map implementations - and currently, the way that it's working is I deserialize that array, then iterate through it and build a map out of it with key -> scriptLines. Your first way makes perfect sense if I created a POJO for that to deserialize into, but I'd like to deserialize it directly into a libgdx ObjectMap for consistency. I'll give it some thought - we're not quite at the performance optimization stage, but this is good to think about now. I definitely wasn't married to that JSON structure, it was just a quick means to an end. If you spot anything else that raises an eyebrow, I'd love to hear it - dev feedback is really helpful.