2012-07-11 4 views
0

웹 서비스에서 이와 같은 응답을받는 응용 프로그램이 있습니다. 아무도 말해 줄 수 개별 문자열 "Info": 객체의 JSON 표현의배열을 구문 분석하는 방법은 무엇입니까?

{ 
    "name":"gdgdgdgd", 
    "desc":"Cosmopolitan life, adventurous outlook, 'been there done that' attitude, and yet the way the life ...", 
    "address1":" 2nd A Main ", 
    "address2":" Layout," 
}, 
+2

NSJSONSerialization을 사용하십시오. – nhahtdh

+0

이것이 효과가 있습니까? – bryanmac

답변

-1

json 라이브러리를 사용하여 다음과 같이하십시오.

NSMutableDictionary * listd = [dict objectForKey : @ "merchantInfo"];

if([listd isKindOfClass:[NSDictionary class]]) 

{ 

    stringshopname=[listd objectForKey:@"name"]; 
    stringshopdesc=[listd objectForKey:@"desc"]; 


} 
관련 문제