Skip to content

Instantly share code, notes, and snippets.

View iyy's full-sized avatar

Ekko.Lee iyy

  • Raptor.Studio
  • guangzhou.China
View GitHub Profile
@iyy
iyy / SimpleJsonTool.cs
Created May 30, 2012 04:18
Generate Json string By dynamic object using JSON.NET
//using JSON.NET 4.5
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Converters;
//for a dynamic object
dynamic person = new JObject();
person.name = "wangwei";
person.age = 25;
string jsonStr = person.toString();