在android中以适当的格式转换日期

时间:2014-10-13 07:11:32

标签: java android json datetime gson

"comments": {
          "data": [
            {
              "created_time": "\/Date(1413140597000+0000)\/",
              "from": {
                "Id": "100000805164684",
                "Name": "Abid Raza",
                "photoUrl": "https:\/\/graph.facebook.com\/100000805164684\/picture"
              },
              "like_count": "0",
              "message": "This is the unpredictable Boys ...!!!!"
            },
            {
              "created_time": "\/Date(1413141137000+0000)\/",
              "from": {
                "Id": "100000525438646",
                "Name": "Saim Ahmad",
                "photoUrl": "https:\/\/graph.facebook.com\/100000525438646\/picture"
              },
              "like_count": "2",
              "message": "..."
            },
            {
              "created_time": "\/Date(1413141351000+0000)\/",
              "from": {
                "Id": "1672606457",
                "Name": "Muhammad Ghufran Siddiqui",
                "photoUrl": "https:\/\/graph.facebook.com\/1672606457\/picture"
              },
              "like_count": "1",
              "message": "At-least we enjoyed :)"
            }
          ]
        }

这是我的json字符串来自它包含created_time字段的Web服务。这是一种奇怪的格式,而不是使用GSON Library在我的java类上进行映射。现在我想将它存储在s字符串中,然后将其转换为日期时间格式。那可能吗?因为我无法理解这种格式。可能这是unix时间。

0 个答案:

没有答案