C#

[C#]Json 데이터 생성/Json 데이터 만들기 예제

선영아 사랑해 2016. 2. 5. 15:26

Json 데이터 생성 예제입니다.


using System.Net.Json;


private void button1_Click(object sender, EventArgs e)

{

JsonArrayCollection jarrCollection = new JsonArrayCollection();

JsonObjectCollection col2 = new JsonObjectCollection();

col2.Add(new JsonStringValue("code", "1234"));
col2.Add(new JsonStringValue("value", "data"));
col2.Add(new JsonNumericValue("int", 10));

jarrCollection.Add(col2);

string strJson = jarrCollection.ToString();

}


첨부파일은 System.Net.Json.dll 파일입니다.


System.Net.Json.zip


System.Net.Json.zip
0.01MB