using System.Collections;
using System.Collections.Generic;
using CsQuery.ExtensionMethods;
using CsQuery.ExtensionMethods.Internal;
public static void Main()
Hashtable keys = new Hashtable();
keys.Add("providerid", "1");
keys.Add("providercode", "monstercode");
keys.Add("providername", "monstername");
string jsonCsQuery = keys.ToJSON();
string jsonNewtonsoft = JsonConvert.SerializeObject(keys);
Console.WriteLine("CsQuery "+jsonCsQuery);
Console.WriteLine("Newtonsoft "+jsonNewtonsoft);
List<KeyValuePair<string, string>> theList = new List<KeyValuePair<string, string>>();
theList.Add(new KeyValuePair<string, string>("providerid", "1"));
theList.Add(new KeyValuePair<string, string>("providercode", "monstercode"));
theList.Add(new KeyValuePair<string, string>("providername", "monstercode"));
string jsonKVPCsQuery = theList.ToJSON();
string jsonKVPNewtonsoft = JsonConvert.SerializeObject(theList);
Console.WriteLine("CsQuery "+jsonKVPCsQuery);
Console.WriteLine("Newtonsoft "+jsonKVPNewtonsoft);
Dictionary<string, string> dict = new Dictionary<string, string>();
dict.Add("providerid", "1");
dict.Add("providercode", "monstercode");
dict.Add("providername", "monstercode");
string jsonDictCsQuery = dict.ToJSON();
string jsonDictNewtonsoft = JsonConvert.SerializeObject(dict);
Console.WriteLine("CsQuery "+jsonDictCsQuery);
Console.WriteLine("Newtonsoft "+jsonDictCsQuery);