我正在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