Umbraco.Belle.System.ManifestParser.ReplaceVirtualPaths C# (CSharp) Method

ReplaceVirtualPaths() private static method

Replaces any virtual paths found in properties
private static ReplaceVirtualPaths ( Newtonsoft.Json.Linq.JObject jObj ) : void
jObj Newtonsoft.Json.Linq.JObject
return void
        private static void ReplaceVirtualPaths(JObject jObj)
        {
            foreach (var p in jObj.Properties().Select(x => x.Value))
            {
                if (p.Type == JTokenType.Object)
                {
                    //recurse
                    ReplaceVirtualPaths((JObject) p);
                }
                else
                {
                    var value = p as JValue;
                    if (value != null)
                    {
                        if (value.Type == JTokenType.String)
                        {
                            if (value.Value<string>().StartsWith("~/"))
                            {
                                //replace the virtual path
                                value.Value = IOHelper.ResolveUrl(value.Value<string>());
                            }
                        }
                    }
                }
            }
        }