Closed Josscii closed 6 years ago
你好,这是一个彩蛋,但只会在JSON格式不正确的时候才可能出现。
请尝试删除一部分属性(可用二分法测试)后是否能正确生成代码,看看是否漏掉逗号或者多了逗号等。
如果你无法确定JSON是否有问题,请一定贴上你的JSON,我再做检查。
Josscii notifications@github.com于2017年9月20日 周三00:11写道:
如图所示:
[image: image] https://user-images.githubusercontent.com/6898115/30599665-c46dba52-9d8f-11e7-8787-b5591a5fae3a.png
麻烦告知解决方案,或者解决 bug。
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nixzhu/Baby/issues/8, or mute the thread https://github.com/notifications/unsubscribe-auth/AAakCGzp_sM9sk34CVkoXgd9VTyvhpH4ks5sj9mVgaJpZM4Pcjit .
找到原因了,我的 json 中,含有这样的键值对:
"source": "<a href=\"http://app.weibo.com/t/feed/6vtZb0\" rel=\"nofollow\">微博 weibo.com"
在粘贴到 baby 里面后,点击 format 会自动去掉 \
,导致格式反而不对,你可以测试一下,目测应该是 bug。
详细的 json 在这里:
{
"created_at": "Tue Sep 19 00:00:22 +0800 2017",
"id": 4153480669181073,
"mid": "4153480669181073",
"idstr": "4153480669181073",
"text": "Hello开车的朋友们,如果在行驶途中看到了背橙色书包的小朋友,请放慢车速,因为他们是有听力障碍的小朋友 。[爱心]我接力[拳头] ",
"textLength": 129,
"source_allowclick": 0,
"source_type": 1,
"source": "<a href=\"http://app.weibo.com/t/feed/6vtZb0\" rel=\"nofollow\">微博 weibo.com</a>",
"favorited": false,
"truncated": false,
"in_reply_to_status_id": "",
"in_reply_to_user_id": "",
"in_reply_to_screen_name": "",
"pic_urls": [
{
"thumbnail_pic": "http://wx4.sinaimg.cn/thumbnail/006Nx4tagy1fjo5ryrtp7j30go0kkt95.jpg"
},
{
"thumbnail_pic": "http://wx1.sinaimg.cn/thumbnail/006Nx4tagy1fjo5rzgnrsj30hs0pswfh.jpg"
}
],
"thumbnail_pic": "http://wx4.sinaimg.cn/thumbnail/006Nx4tagy1fjo5ryrtp7j30go0kkt95.jpg",
"bmiddle_pic": "http://wx4.sinaimg.cn/bmiddle/006Nx4tagy1fjo5ryrtp7j30go0kkt95.jpg",
"original_pic": "http://wx4.sinaimg.cn/large/006Nx4tagy1fjo5ryrtp7j30go0kkt95.jpg",
"geo": null,
"is_paid": false,
"mblog_vip_type": 0,
"user": {
"id": 6228719464,
"idstr": "6228719464",
"class": 1,
"screen_name": "那迟温",
"name": "那迟温",
"province": "46",
"city": "1000",
"location": "海南",
"description": "岁月还漫长终会有一人陪你骑马喝酒走四方",
"url": "",
"profile_image_url": "http://tvax2.sinaimg.cn/crop.0.0.180.180.50/006Nx4taly8ff5r7h6syqj305k05kmx1.jpg",
"profile_url": "u/6228719464",
"domain": "",
"weihao": "",
"gender": "f",
"followers_count": 58,
"friends_count": 356,
"pagefriends_count": 0,
"statuses_count": 27,
"favourites_count": 0,
"created_at": "Mon May 01 12:32:54 +0800 2017",
"following": false,
"allow_all_act_msg": false,
"geo_enabled": true,
"verified": false,
"verified_type": -1,
"remark": "",
"insecurity": {
"sexual_content": false
},
"ptype": 0,
"allow_all_comment": true,
"avatar_large": "http://tvax2.sinaimg.cn/crop.0.0.180.180.180/006Nx4taly8ff5r7h6syqj305k05kmx1.jpg",
"avatar_hd": "http://tvax2.sinaimg.cn/crop.0.0.180.180.1024/006Nx4taly8ff5r7h6syqj305k05kmx1.jpg",
"verified_reason": "",
"verified_trade": "",
"verified_reason_url": "",
"verified_source": "",
"verified_source_url": "",
"follow_me": false,
"like": false,
"like_me": false,
"online_status": 0,
"bi_followers_count": 2,
"lang": "zh-cn",
"star": 0,
"mbtype": 0,
"mbrank": 0,
"block_word": 0,
"block_app": 0,
"credit_score": 80,
"user_ability": 0,
"urank": 6,
"story_read_state": -1,
"vclub_member": 0
},
"reposts_count": 132,
"comments_count": 2,
"attitudes_count": 0,
"isLongText": false,
"mlevel": 0,
"visible": {
"type": 0,
"list_id": 0
},
"biz_feature": 0,
"hasActionTypeCard": 0,
"darwin_tags": [],
"hot_weibo_tags": [],
"text_tag_tips": [],
"userType": 0,
"more_info_type": 0,
"positive_recom_flag": 0,
"gif_ids": "",
"is_show_bulletin": 2,
"comment_manage_info": {
"comment_permission_type": -1
}
}
好,感谢测试!之后会研究一下。 Josscii notifications@github.com于2017年9月20日 周三00:35写道:
找到原因了,我的 json 中,含有这样的键值对:
"source": "<a href="http://app.weibo.com/t/feed/6vtZb0\" rel="nofollow">微博 weibo.com"
在粘贴到 baby 里面后,点击 format 会自动去掉 \,导致格式反而不对,你可以测试一下,目测应该是 bug。
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/nixzhu/Baby/issues/8#issuecomment-330575892, or mute the thread https://github.com/notifications/unsubscribe-auth/AAakCKnxJIskRA3OGuUmgIu7dX0oZ67Qks5sj9zKgaJpZM4Pcjit .
如图所示:
麻烦告知解决方案,或者解决 bug。