[Objective-c] string JSON to JSON 으로 변경하기
2024. 5. 9. 14:56ㆍ개발/iOS
NSString *strJson=@"{\"person\":{\"name\":\"sodud\",\"age\":20},\"family\" : [{\"location\":\"kr\",\"mobile\":123456789}]}";
NSData *data = [strJson dataUsingEncoding:NSUTF8StringEncoding];
id jsonOutput = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
NSLog(@"%@",jsonOutput);
{
family = (
{
location = kr;
mobile = 123456789;
}
);
person = {
name = sodud;
age = 20;
};
}
'개발 > iOS' 카테고리의 다른 글
[iOS] 심볼릭 링크(Symlink)란? (0) | 2024.08.22 |
---|---|
[swift] dispatch_async() 비동기로 실행 시키기 (0) | 2024.08.07 |
[Objective-c] How Convert int to String ? (0) | 2024.05.09 |
[XCode] 프로젝트 무한로딩 오류 (0) | 2024.04.16 |
[Swift] print() dump() 함수 차이점 (1) | 2024.04.01 |