Develop
2013.04.23 17:35
[c#] Hashtable <-> Json (dll 포함)
조회 수 80734 댓글 0
첨부 '1' |
---|
# 샘플코드
using System.Net.Json; public string ConvertHashtableToJson(Hashtable data) { JsonObjectCollection result = new JsonObjectCollection(); foreach(DictionaryEntry item in data) { result.Add(new JsonStringValue(item.Key.ToString(), item.Value.ToString())); } return result.ToString(); } public Hashtable ConvertJsonToHashtable(string json) { JsonTextParser parse = new JsonTextParser(); JsonObject object = parse.Parse(json); Hashtable result = new Hashtable(); foreach(JsonObject item in obj as JsonObjectCollection) { result.add(item.Name, item.GetValue().ToString()); } }
[참고] http://bit.ly/hYMCLL (여기와 같은 dll을 업로드 함.)
-
[c#] Hashtable <-> Json (dll 포함)
-
[android] 점심 해결 앱 소스 코드 ㅋㅋ
-
[android] 안드로이드 어플 모음 ㅎㅎ
-
[android] 만화 어플 소스코드
-
[android] 디바이스(시뮬레이터) hosts 파일 수정하기
-
[android] SurfaceView를 이용한 애니메이션 ㅎㅎ
-
[android] How can I place app icon on launcher home screen?
-
[android] dp, px 서로 변환
-
[android] Canvas를 이용해 이미지 확대/축소 하기
-
[android] Calling activity function from separate class
-
[Android Error] The number of method references in a .dex file cannot exceed 64K
-
XML, JSON, BSON, MSGPACK 장,단점 비교