How do I Change an Information inside a Json File?

Hello, I’m using json to store data from my application, let’s suppose I have something like ‘“score” : 32’ and at some point in the game I have to update it trough unity (saving player’s score, ths kinda stuff) How do I do it/ what is the C# code for it, without having to rewrite the entire script for each information I change?

using some json parser you turn the string into an object, modify the property, then turn it back into the json string.

Unity has built in json parser methods:

And an article on using it:

Of course, their technique treats json as a serialization technique for unity objects. If you don’t have classes defined for the objects being serialized, you won’t be able to do it.

There are 3rd party json parsers though that are very generic.

For example SimpleJSON found on the unify wiki:
http://wiki.unity3d.com/index.php/SimpleJSON

(I have no experience with this tool, I am not giving it a good review… just demonstrating that 3rd party options exist)