iPhone:解析字符串

发布于 2024-11-07 07:30:26 字数 829 浏览 0 评论 0原文

嘿,我有一个这种格式的响应字符串

,好吧,我原来的响应字符串是这样的

{
  "data": [
    {
     "name": "Santa Fe Plaza",
     "category": "Landmark",
     "location": {
        "city": "Santa Fe",
        "state": "NM",
        "country": "United States",
        "latitude": 35.687071155202,
        "longitude": -105.93767717603
     },
     "id": "108196762542063"
  },
  {
     "name": "Museum of Contemporary Native Arts",
     "category": "Museum/art gallery",
     "location": {
        "street": "108 Cathedral Place",
        "city": "Santa Fe",
        "state": "NM",
        "country": "United States",
        "zip": "87501",
        "latitude": 35.686915835451,
        "longitude": -105.93725120129
     },
     "id": "106209180361"
  }

] 一点

我必须从那里提取所有名称请告诉我如何实现这 JSON 解析器一直抛出错误

提前感谢

Hey I have a response string in this format

ok my original resonse string is like this

{
  "data": [
    {
     "name": "Santa Fe Plaza",
     "category": "Landmark",
     "location": {
        "city": "Santa Fe",
        "state": "NM",
        "country": "United States",
        "latitude": 35.687071155202,
        "longitude": -105.93767717603
     },
     "id": "108196762542063"
  },
  {
     "name": "Museum of Contemporary Native Arts",
     "category": "Museum/art gallery",
     "location": {
        "street": "108 Cathedral Place",
        "city": "Santa Fe",
        "state": "NM",
        "country": "United States",
        "zip": "87501",
        "latitude": 35.686915835451,
        "longitude": -105.93725120129
     },
     "id": "106209180361"
  }

]
}

I have to extract all the names from there Please enlighten me how to achieve this
JSON parser is throwing error all the time

Thanx in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文