So I'm working on a Javascript gamemode for fun in an IP.Board Group. The game would be similar to a RPG Text based game. I had it in python using Json.loads & Json.dumps to read and write the values, (exp,level,HP) but I cannot find a similar way to do this in Javascript. Is there any way to have a similar kind of layout? Thanks.
I did look at the alternative ways others did it, but unfortunately that would not work for me as they read an already set variable. Mine would be constantly changing, the reason for Json.dumps and Json.loads in python reading and writing the data. For example, in Python, If you won a battle within the RPG game you would be awarded XP, json.dumps and json.loads would then load your current level from the buffer, add XP etc, then resave it with the new amount. So a solid variable or definition would not work for this. Hence why I asked about a json.dumps or json.loads version in Javascript.
I Must also note that it's not just local sided, it's set to be used by clients too so printing the values would be no good either.