数据对象JSON格式

这是数据格式的定义,在api文档里统一使用变量名的方式引用这些数据格式。
假设定义了:
 "myobject": {"id": 1111,"name": “123abc”}
文档里可以使用三种方式引用*myobject*这种数据格式:
*myobject*、*{myobject}*、*{myobject(anotherName)}*
分别表示:
*myobject* -> "id": 1111,"name": “123abc”
*{myobject}* -> "demo": {"id": 1111,"name": “123abc”}
*{myobject(anotherName)}* -> "anotherName": {"id": 1111,"name": “123abc”}

1. 分享/草稿

"share":{
                "id": 1000001,
                "title": "title",
                "ownerId": 100001,
                "shareDescPreview": "description preview",
                "categories": [
                    {
                        "categoryId": 10001
                    },
                    {
                        "categoryId": 10002
                    },
                    {
                        "categoryId": 10003
                    }
                ]
                "status": "10",
                "longitude": "10",
                "latitude": "10",
                "viewCount": 10,
                "viewCountLastView": 10,
                "commentCount": 10,
                "commentCountLastView": 10,
                "applyCount": 10,
                "applyCountLastView": 10,
                "likeCount": 10,
                "likeCountLastView": 10,
            "picHomepage": "http://img0.qianbao.com/4,0f20b97296"
            }

2. 分享的详情图片

"sharePics": [
            {
                "picUrl": "http://img0.qianbao.com/4,0f20b97296",
                "sequence":"0"
            },
            {
                "picUrl": "http://img0.qianbao.com/4,0f20b97296",
                "sequence":"1"
            },
            {
                "picUrl": "http://img0.qianbao.com/4,0f20b97296",
                "sequence":"2"
            },
            {
                "picUrl": "http://img0.qianbao.com/4,0f20b97296",
                "sequence":"3"
            },
            {
                "picUrl": "http://img0.qianbao.com/4,0f20b97296",
                "sequence":"4"
            },
            {
                "picUrl": "http://img0.qianbao.com/4,0f20b97296",
                "sequence":"5"
            },
            {
                "picUrl": "http://img0.qianbao.com/4,0f20b97296",
                "sequence":"6"
            },
            {
                "picUrl": "http://img0.qianbao.com/4,0f20b97296",
                "sequence":"7"
            },
            {
                "picUrl": "http://img0.qianbao.com/4,0f20b97296",
                "sequence":"8"
            }
        ]

3. 用户

"user": {
        "id": 1111,
        "nickName": “nick_name”,
        "realName": “real_name”,
        "mobile": "18800000000",
        "email": “email@163.com”,
        "password": “********”,
        "description": “111111111111”,
        "icon": "http://img0.qianbao.com/4,0f20b97296"
    }

4. 申请

"application": {
                "id": 10001,
                "shareId": 20001,
                "ownerId": 20001,
                "applyTime": 1504077543058,
                "applyType": 10,
                "status": 20,
                "address": "address"
            }

5. 地址

"address": {
                "id": 10001,
                "province": "province",
                "city": "city",
                "address": "address",
                "default": 0
            }

6. 我关注谁

"followee": {
                "userId": 20001,
                "nickName": "nick_name",
                "province": "",
                "city": "",
                "isFollower": 1,
                "icon": "http://img0.qianbao.com/4,0f20b97296"
            }

7. 谁关注我

"follower": {
                "userId": 20001,
                "nickName": "nick_name",
                "province": 300001,
                "city": 2000002,
                "isFollowee": 2000002,
                "icon": "http://img0.qianbao.com/4,0f20b97296"
            }

8. 订单

"takeOrder": {
                "id": 100001,
                "shareId": 100001,
                "ownerId": 100001,
                "applicantId": 100001,
                "applicationId": 100001,
                "takeTime": 1504077543058,
                "takeType": 10,
                "addressId": 100001,
                "orderStatus": 60
            }

9. 分享的评论

"shareComment": {
                "id": 10002,
                "parentCommentId": 10001,
                "userId": 20004,
                "shareId": 1000001,
                "content": "content2"
            }

10. 显摆

"show": {
        "id": 111,
        "orderId": 1000001,
        "receiverId": 100001,
        "giverId": 100001,
        "viewCount": 10,
        "commentCount": 10,
        "applyCount": 10,
        "likeCount": 10,
        "showContentPreview": "show_content_preview",
        "moodIconUrl": "http://img0.qianbao.com/4,0f20b97296",
        "showPicUrls": {
            "0": "http://img0.qianbao.com/4,0f20b97296",
            "1": "http://img0.qianbao.com/4,0f20b97296",
            "2": "http://img0.qianbao.com/4,0f20b97296",
            "3": "http: //img0.qianbao.com/40f20b97296",
            "4": "http://img0.qianbao.com/4,0f20b97296",
            "5": "http://img0.qianbao.com/4,0f20b97296",
            "6": "http://img0.qianbao.com/4,0f20b97296",
            "7": "http: //img0.qianbao.com/40f20b97296",
            "8": "http://img0.qianbao.com/4,0f20b97296"
        }
    }

11. 分享的评论

"showComment": {
                "id": 10002,
                "parentCommentId": 10001,
                "userId": 20004,
                "content": "content2"
            }

12. 地址区域

"region": {
                "id": 10001,
                "regionName": "region_name",
                "layer": 10,
                "parentRegionId": 100001
            }
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 173,890评论 25 709
  • 曾经有一份美好的爱情放在我的面前我没有珍惜。等到失去后才后悔莫及。如果可以再对小李说。毛欣想说。这辈子无缘再牵手。...
    毛欣与小李阅读 2,708评论 0 13
  • 北京时间9:30,从睡梦中醒来,睁开惺忪的睡眼,发现阳光洒满了整间屋子,厨房里做着我最爱的小米饭和土豆丝,依稀可以...
    温婕阅读 173评论 0 2
  • 我们经常说学以致用,学到新的知识技能,要想办法把他用出来,只有用出来后,知识才是你的,你才能知道,哪些知识是真的学...
    乐此不疲的猫阅读 198评论 0 0
  • 有人说长大是一种罪过。即便过去的岁月疼痛难忍,可我还是忍不住要回忆过去。这都是岁月带给我们的东西。 那么岁月是什么...
    点点柠檬酸阅读 263评论 0 0