using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using System.Web.Script.Serialization;
using Newtonsoft.Json;
namespace jsonStudy
{
class Program
{
static void Main(string[] args)
{
Dictionary<string, object> hashMap = new Dictionary<string, object>();
hashMap.Add("Name", "测试名称");
hashMap.Add("Age", 23);
hashMap.Add("pen", new string[] { "钢笔", "圆珠笔" });
Console.WriteLine(DictionaryToJson(hashMap));
string jsonData = DictionaryToJson(hashMap);
Dictionary<string, object> jsonObj = JsonToDictionary(jsonData);
Console.Wr
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using System.Web.Script.Serialization;
using Newtonsoft.Json;
namespace jsonStudy
{
class Program
{
static void Main(string[] args)
{
Dictionary<string, object> hashMap = new Dictionary<string, object>();
hashMap.Add("Name", "测试名称");
hashMap.Add("Age", 23);
hashMap.Add("pen", new string[] { "钢笔", "圆珠笔" });
Console.WriteLine(DictionaryToJson(hashMap));
string jsonData = DictionaryToJson(hashMap);
Dictionary<string, object> jsonObj = JsonToDictionary(jsonData);
Console.Wr