EvilZone

Programming and Scripting => .NET Framework => : xor May 19, 2015, 02:14:40 AM

: [C#] JSON to ExpandoObject from Web URL
: xor May 19, 2015, 02:14:40 AM

:
        public static dynamic GetJson(string url)
        {
            dynamic s;
            using (var client = new WebClient())
            {
                var json = client.DownloadString(url);
                s = JsonConvert.DeserializeObject<ExpandoObject>(json);
            }


            return s;
        }
: Re: [C#] JSON to ExpandoObject from Web URL
: Xires May 21, 2015, 12:04:05 PM
Linq is thoroughly confused by embedding this into statements.  It's rather humorous.  Excellent submission, though.  Thanks much.  It's sad to see your nick with so few cookies so have a couple extra. ;-P