[C#] JSON Parsing .. Json.Net Library 이용 > C#/.Net/Blazor/IIS

본문 바로가기

사이트 내 전체검색

C#/.Net/Blazor/IIS

[C#] JSON Parsing .. Json.Net Library 이용

작성일 18-07-25 18:02

페이지 정보

작성자sbLAB 조회 6,156회 댓글 0건

본문


using System.Net.Json;
 
class Program
{
static void Main(string[] args)
{
String inJson = "{'name':'test', 'type':'test'}";
 
JsonTextParser parser = new JsonTextParser();
JsonObject obj = parser.Parse(outJson);
JsonObjectCollection col = (JsonObjectCollection)obj;
 
string name = (string)col["name"].GetValue();
string type = (string)col["type"].GetValue();
} 
}
 

댓글목록

등록된 댓글이 없습니다.

Copyright © 소유하신 도메인. All rights reserved.
PC 버전으로 보기