我正在Iphone上首次使用JSON解析。我需要解析如下JSON字符串:用Iphone解析json
{
EmpMaster :
[
{"empId" : 1,"firstName" : "Yogesh","lastName":"Chaudhari","isSupervisor" : "1","supervisorId":"1"},
{"empId" : 2,"firstName" : "Sahil","lastName":"Khurana","isSupervisor" : "1","supervisorId":"1"},
{"empId" : 3,"firstName" : "Anutag","lastName":"Chaudhari","isSupervisor" : "1","supervisorId":"1"},
{"empId" : 4,"firstName" : "Sameer","lastName":"Vaidya","isSupervisor" : "1","supervisorId":"1"}
]
}
請爲我提供了一些示例代碼或鏈接在其幫助下,我可以解析JSON字符串並分離EMPID,名字,姓氏,isSupervisor和supervisorId。
嗨Deeps.Can請給我一些示例代碼來解析上面的json字符串嗎?我是相當新的使用iphone上的json –
@Shraddha Harne看看發送的鏈接和其他答案建議的教程。 Stackoverflow不是複製和粘貼源代碼庫。 –
@Shraddha我修改了我的答案。希望有所幫助。 – Deeps