Alright. I'm working on a save editor for a game as a project and the save is in JSON. I have a small snippet returned from the actual editor after using it, and it looks like:
{"hero":{"STR":10,"HP":33,"HT":35,"attackSkill"13,"defenseSkill":3}}
This is only a small part of the save. I can't for the life of me figure out how to only replace this part in the whole save. I have tried
- Json to C#-ing the whole thing. This doesn't work because for some reason the game maker decided to have half of the fields be class names from his game, ex. "com.whatever.whatever":1. This freaks out the parser.
- Just using the returned snippet. The game won't accept it as it's not nearly as complete as the actual save.
- Just searching for the values. I can't get this to work, just because I don't how to manipulate strings well.
I want to just replace the
{"hero"{...}}
part with the new part.
How would I go about doing it? Thanks.
Also, pastebin of the game save, if anyone wants/needs it: http://pastebin.com/eK13cNtg