Encode IDictionary To Json - CSharp System.Collections.Generic

CSharp examples for System.Collections.Generic:IDictionary

Description

Encode IDictionary To Json

Demo Code


using System.Web;
using Newtonsoft.Json;

public class Main{
        public static string EncodeToJson(this System.Collections.Generic.IDictionary<string, string> self)
        {/* www .ja v a2  s  .c o m*/
            return JsonConvert.SerializeObject(self);
        }
}

Related Tutorials