我正在使用 Jawbone SDK https://github.com/Jawbone/UPPlatform_Android_SDK
并希望将此响应解析为 Gson https://jawbone.com/up/developer/endpoints/trends
如何为此响应创建 Gson 对象?
{
“meta”:
{
“user_xid”: “6xl39CsoVp2KirfHwVq_Fx”,
“message”: “OK”,
“code”: 200,
"time": 1386711801
},
“data”:
{
"earliest": 20120525,
"data":
[[
20131105,
{
"weight": 94.6
"height": 1.8034
"gender": false
"age": 29.5835616438
"bmr": 2002.0974546
"body_fat": 25
"goal_body_weight_intent": 1,
"goal_body_weight": 50.8,
"m_steps": 2184
"m_calories": 129.136649132
"m_total_calories": 2131.23410373
"m_active_time": 1093
"m_workout_time": 0
"m_distance": 1795
"e_calories": 530
"e_carbs": 64.75
"e_cholesterol": 50
"e_protein": 16.77
"e_calcium": 140
"e_unsat_fat": 15.313
"e_sat_fat": 6
"e_sodium": 504
"e_sugar": 19
"e_fiber": 0
"s_bedtime": -370
"s_asleep_time": 298
"s_awake": 1820
"s_awake_time": 24530
"s_awakenings": 2
"s_light": 9828
"s_sound": 13252
"s_duration": 23080
"s_quality": 69
"n_bedtime": null
"n_asleep_time": null
"n_awake": null
"n_awake_time": null
"n_awakenings": null
"n_light": null
"n_sound": null
"n_duration": null
"n_quality": null
}
],[
... more data ...
]],
"links":
{
"next": "/nudge/api/v.1.1/users/6xl39CsoVp2KirfHwVq_Fx/trends/?end_date=20131104&range=w&range_duration=5&bucket_size=d"
}
}
}