【发布时间】:2015-05-15 05:40:38
【问题描述】:
这里我想在 SharedPreferences 中 Json 对象。我不知道这是不是存储 json 对象的最佳方式。
这里我想存储 Json 对象,并在需要时调用它的 Json 对象并获取详细信息来存储和删除详细信息。
这是我存储数据的 json 格式。
评论包含我对 myPhoto/Myvideo 的评论的所有详细信息 提及包含我在 cmets 中提及的所有细节 朋友数据包含我的整个朋友列表关注/关注。 如果任何朋友被删除,朋友更新和朋友删除将包含
我如何在共享偏好中存储此类信息。 这是正确的方法吗?
{
"data": {
"message": "List of comments",
"comments": [
{
"userId":
"commentId":
"name":
"text":
"dateAdded":
"imageLink":
}
],
"addPosition": "0",
"mentions": [
{
"id":
"name":
},
{
"id":
"name":
],
"videoUserData": {
"userId":
"name":
"description":
"views":
"dateAdded":
"imageLink":
},
"friendsAdded": [
{
"userId":
"name":
"imageLink":
},
{
"userId":
"name":
"imageLink":
},
{
"userId":
"name":
"imageLink":
},
{
"userId":,
"name":
"imageLink":
},
{
"userId":
"name":
"imageLink":
},
{
"userId":
"name":
"imageLink":
},
{
"userId":
"name":
"imageLink":
},
{
"userId":
"name":
"imageLink":
},
{
"userId":
"name":
"imageLink":
},
{
"userId":
"name":
"imageLink":
},
{
"userId":
"name":
"imageLink":
},
{
"userId":
"name":
"imageLink":
],
"friendsDeleted": [],
"friendsUpdated": [],
"friendsSyncDate": "2015-05-13 17:50:34"
},
"statusCode": 200
}
【问题讨论】:
标签: android json sharedpreferences