Skip to content

Instantly share code, notes, and snippets.

View zoolbia's full-sized avatar

J. Zoolbia zoolbia

View GitHub Profile
JavaScriptSerializer js = new JavaScriptSerializer();
try
{
string strData = "JSON data";
Dictionary<string, object> dic = js.Deserialize<Dictionary<string, object>>(strData);
}
catch (ArgumentException argE)
{
MessageBox.Show("JSON data is not valid", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}