OneDrive/Extensions/ItemExtensionMethods.cs
/// <summary>
/// Converts an ODItem into a Json String
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
Converts an ODItem into a Json String
Converts an ODItem into a Json String
public static string JsonString(this ODDataModel item)
        {
            object jsonSource = item;
#if DEBUG
            if (null != item.OriginalJson)
            {
                jsonSource = Newtonsoft.Json.JsonConvert.DeserializeObject(item.OriginalJson);
            }
#endif
            return Newtonsoft.Json.JsonConvert.SerializeObject(jsonSource, Newtonsoft.Json.Formatting.Indented);
        }
public static string JsonString ( this ODDataModel item ) { object jsonSource = item ; if DEBUG if ( null != item . OriginalJson ) { jsonSource = Newtonsoft . Json . JsonConvert . DeserializeObject ( item . OriginalJson ) ; } endif return Newtonsoft . Json . JsonConvert . SerializeObject ( jsonSource , Newtonsoft . Json . Formatting . Indented ) ; }
Converts an ODItem into a Json String
Converts an ODItem into a Json String
// Pretty-print the JSON by round tripping through the JSON converter
None
ODDataModel
this
item
None