How to Parse JSON Using C# .Net

There are a few libraries you can use to parse json but they can be a pain to initialize and setup when all you need is to grab a specific value given a parameter name and you don't have an array of data.

Here's a function I use for the above scenario:

private string ParseJSON(string getField, string jsonData)
string returnValue = "";

returnValue = jsonData.Substring((jsonData.IndexOf(getField) + getField.Length + 3));
returnValue = returnValue.Substring(0, returnValue.IndexOf("}") - 1);
returnValue = returnValue.Substring(0, returnValue.IndexOf(",") - 1);

return returnValue;



  1. Thanks a lot for sharing this with all of us, I like it and we can communicate. Do you need buy app ratings and reviews. To boost app ranking and double app downloads now.