求读取Json格式字符串

海子IT 发布于 2013/04/17 19:29
阅读 391
收藏 1

现在我有个字符串:

{
   "data": [
      {
         "id": "590691824_10151336005981825",
         "from": {
            "name": "Adele Little",
            "id": "590691824"
         },
         "to": {
            "data": [
               {
                  "name": "Mark Miller",
                  "id": "1541592211"
               },
               {
                  "name": "Nik Denton",
                  "id": "730684024"
               },
               {
                  "name": "Stephen Higginson",
                  "id": "511618842"
               }
            ]
         },
         "message": "4 hours to go then a nice long weekend....... its a scorcher today people.  I am awaiting the arrival of Mark Miller then 2mo i pick up ma buddy Nik Denton and Stephen Higginson.... for a day at the pool, a few cold beers the off to the Watermelon for dinner.  Bring on the sunbathing and good friends xxxx",
         "message_tags": {
            "105": [
               {
                  "id": "1541592211",
                  "name": "Mark Miller",
                  "type": "user",
                  "offset": 105,
                  "length": 11
               }
            ],
            "145": [
               {
                  "id": "730684024",
                  "name": "Nik Denton",
                  "type": "user",
                  "offset": 145,
                  "length": 10
               }
            ],
            "160": [
               {
                  "id": "511618842",
                  "name": "Stephen Higginson",
                  "type": "user",
                  "offset": 160,
                  "length": 17
               }
            ]
         },
         "privacy": {
            "value": ""
         },
         "type": "status",
         "created_time": "2013-04-11T12:03:58+0000",
         "updated_time": "2013-04-11T12:03:58+0000"
      },
      {
         "id": "1439951466_10201010696416503",
         "from": {
            "name": "Jessica Jade Destich",
            "id": "1439951466"
         },
         "message": ":) my fruit crisper is full with pineapple, watermelon, apples, nectarines and banana so very happy really loving my fruit at the moment thinking of making a juice tomorrow",
         "privacy": {
            "value": ""
         },
         "type": "status",
         "application": {
            "name": "Facebook for iPhone",
            "namespace": "fbiphone",
            "id": "6628568379"
         },
         "created_time": "2013-04-11T11:55:00+0000",
         "updated_time": "2013-04-11T11:55:00+0000"
      },
      {
         "id": "274230365954128_537372629639899",
         "from": {
            "category": "Health/medical/pharmaceuticals",
            "name": "Doctor advise forum",
            "id": "274230365954128"
         },
         "message": "Acidity and Heartburn~\nAcidity and heartburn are due to\npresence of too much\nacid in the stomach that causes\nexasperation of the\ngastrointestinal casing. This causes a\nblazing pain. When\nthis excessive acid leaks back into\nthe throat this\ninflames and the reaction of\nheartburn is produced.\nCauses of Acidity and Heartburn~\n\nThe following circumstances can\ncreate excessive acid in\nstomach causing acidity and\nheartburn.\n\u2022Consumption of rich and spicy\nfoods\n\u2022Eating speedily, very fast devoid of\nproper chewing\n\u2022Eating hurriedly while beneath\nstress\n\u2022Inappropriate sleep\n\u2022Alcohol utilization\n\u2022Pregnant women may undergo\nbecause when the baby grows, the\nuterus exerts force on the digestive\narea\n\u2022Overweight people may bear\nbecause of unnecessary\npressure on their digestive tract.\nNatural treatment of Acidity &\nHeartburn~\n> Bananas have defensive action\nagainst the acidity and\nheart burn. Eating a banana every\nday will stop such\nconditions\n\u2022Obtain a mixture of 2 tsp of\nnormal apple cider vinegar\nand 2 tsp raw honey in a glass of\nwater earlier than\nmeals. One of the well liked home\nremedy for acidity.\n\u2022Stay away from fried foods,\npickles, hot spicy foods,\nvinegar, and chocolate\n\u2022Stay away from raw salad of\nvegetables like onion, cabbage,\nradish, and peppers\n\u2022Keep away from unripe high pectin\nfruits, such as unripe\napple. But ripe apple such as\ndelicius apple or fuji apple\nmay help out\n\u2022Grind up the food properly. Do not\nconsume in hurry\n\u2022Do not bounce meals. Do not keep\ngreat gap between meals. This\nproduces gas / current of air.\n\u2022Drink lots of water, at least 8\nglasses each day\n\u2022Do not eat just previous to going to\nbed\n\u2022End smoking and cut down on\nalcohol\nHome Remedy for Acidity\n\u2022A good Home Remedy for Acidity is\nto chew up a few basil (tulsi ) leaves\nto obtain relief from blazing, nausea\nand gas\n\u2022Stay a small part of jaggery (gur) in\nyour jaws and\nslowly suck it. Repeat it each hour\ntill acidity subsides.\nOne of the best home remedies for\nacidity.\n\u2022Eat watermelon, banana or\ncucumber each hour.\n\u2022Eat a few almonds when your\nexperience heartburn\nsymptoms. This is good Home\nRemedy for Acidity\n\u2022Gulp coconut water 4-5 periods a\nday.\n\u2022Drink a glass of cold milk for quick\nrelief of heartburn\nand acidity\n\u2022Drink fresh mint juice gradually\nafter meals. This remedy\nis best Home Remedies for Acidity",
         "privacy": {
            "value": ""
         },
         "type": "status",
         "application": {
            "name": "Mobile",
            "id": "2915120374"
         },
         "created_time": "2013-04-11T11:52:22+0000",
         "updated_time": "2013-04-11T11:52:22+0000",
         "likes": {
            "data": [
               {
                  "name": "Dr-Aijaz Ali Jagirani Baloch",
                  "id": "100003282736879"
               }
            ],
            "count": 1
         }
      },

....

现在想在后台把这个字条串分解了后在页面上一组一组的显出来。弄了一天没弄出来,求大神帮忙。很急。多谢

 

加载中
返回顶部
顶部