代码之家  ›  专栏  ›  技术社区  ›  M. Usman Khan

Android/Java Json字符串到不带gson的对象(反序列化)[重复]

  •  0
  • M. Usman Khan  · 技术社区  · 7 年前

    我有以下JSON文本。如何解析它以获取 pageName , pagePic , post_id

    {
       "pageInfo": {
             "pageName": "abc",
             "pagePic": "http://example.com/content.jpg"
        },
        "posts": [
             {
                  "post_id": "123456789012_123456789012",
                  "actor_id": "1234567890",
                  "picOfPersonWhoPosted": "http://example.com/photo.jpg",
                  "nameOfPersonWhoPosted": "Jane Doe",
                  "message": "Sounds cool. Can't wait to see it!",
                  "likesCount": "2",
                  "comments": [],
                  "timeOfPost": "1234567890"
             }
        ]
    }
    
    0 回复  |  直到 7 年前