Saturday, November 18, 2017

JSON to Dictionary Conversion


Here is the tip to convert JSON Object to Dictionary.


private static Dictionary<string, object> GetDictFromJObject(JObject inJObject)
{
        if (inJObject == null) return new Dictionary<string, object>();
        return ((JObject)inJObject).ToObject<Dictionary<string, object>>();
}

No comments:

Post a Comment

All Blogs so far ...