First we need to create a model. This model must conform to the JSON structure. There are several ways to create this model.
Probably the best and safest way is to write it manually. If you are using vs2015, you can also copy json and paste it as a class.
You can find this option here: 
Another option is to use a website, like http://json2csharp.com/ here, you can insert JSON, and this will also generate classes for your JSON. Keep in mind that this generator is not 100% accurate, so you may have to change some properties yourself.
We got a model in which we can use lib, for example JSON.net to deserialize our JSON. The website also has additional documentation on how to use JSON.net
var userList = JsonConvert.DeserializeObject<List<UserModel>>(users);
Remember that if you miss a property in your model, this will not always result in an error. Therefore, make sure that all properties have been correctly serialized.
Serialization is as simple as deserialization.
string json = JsonConvert.SerializeObject(model); File.WriteAllText("C:\json.txt",json);
Optional encoding is added when writing json.
File.WriteAllText("C:\json.txt",json,Encoding.UTF8);
source share