Develop
2013.04.23 17:35
[c#] Hashtable <-> Json (dll 포함)
Views 80731 Comment 0
Attachment '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을 업로드 함.)
-
[ios] 아이폰용 앱 오픈 소스들
-
자주 쓰는 Docker 명령어 alias
-
[ios] 언어, 지역, 국가 설정 가져오기
-
[ios] Start developing your navigation app for CarPlay without enrollment
-
[android] 만화 어플 소스코드
-
레고 마인드스톰 NXT 수도쿠, 큐브 소스코드..
-
[c#] Hashtable <-> Json (dll 포함)
-
[C#] MD5, SHA1 해시 & 인코딩
-
[android] 점심 해결 앱 소스 코드 ㅋㅋ
-
[json] 종결자 (설명과 웹, C/C++/C# 프로그램 샘플 코드)
-
[android] keytool을 사용하여 키스토어 생성
-
[ios] Random Thoughts: Rand() vs. arc4random()