零、前言
Array starting at Zero ——XXX
0.0 什么是JSON?
想必进行过牌堆编写,或稍微阅读过牌堆内容的用户应该对JSON这个格式不陌生毕竟后缀都是.json了谁会想不到嘛
或者在Minecraft游戏里玩过命令方块指令的,可能也对此稍微有所了解。
引用:
什么是 JSON ?
- JSON 指的是 JavaScript 对象表示法(JavaScript Object Notation)
- JSON 是轻量级的文本数据交换格式
- JSON 独立于语言:JSON 使用 Javascript语法来描述数据对象,但是 JSON 仍然独立于语言和平台。JSON 解析器和 JSON 库支持许多不同的编程语言。 目前非常多的动态(PHP,JSP,.NET)编程语言都支持JSON。
- JSON 具有自我描述性,更易理解
在需要有格式地存取大量信息的场合下,使用JSON的存取会更为便捷。
JSON的内容通常以{}
包含首尾,长得像下面这样:
{"xxx":"yyy"}
{"xxx":["yyy","yyy"]}
{"xxx":[{"yyy":"zzz","yyy":"zzz","a":1},{"yyy":"zzz","yyy":"zzz","a":0}]}
此类大量套娃的文本。
这样的内容就是JSON。
现在看起来可能还没那么复杂,但俗话说,前略,三生万物……
……于是,如果是这样呢?!
不想开链接的可以看下面:
{"code":0,"message":"0","ttl":1,"data":{"bvid":"BV1tY411b7wE","aid":253310569,"videos":1,"tid":28,"tname":"原创音乐","copyright":1,"pic":"http://i0.hdslb.com/bfs/archive/9abc024367fa50676db5aa42427204cf7fe860f7.jpg","title":"【V.W.P】《言霊/言灵》 / V.W.P #6【Original MV】","pubdate":1642762809,"ctime":1642738257,"desc":"爱啊、化作言灵拯救世界。\nLove, save the world as our spirit of words.\n\nV.W.P 4th Digital Single ”言霊” (Spirit of Words) \n2022.1.21(00:00)streaming&download(日本时间)\n2022.1.21(20:00)Music Video公開(日本时间)\navailable on streaming services and to download on 2022.1.21 (00:00)(日本时间)\nmusic video will be released on 2022.1.21 (20:00)(日本时间)\n\nLyric \u0026 Music \u0026 Arranged:IORI KANZAKI \nSinging:V.W.P(KAF / RIM / HARUSARUHI / ISEKAIJOUCHO / KOKO)\n\nDirector:Kenji Kawasaki(eallin)\nCG Artist:Eiji Takada(eallin)/ Wataru Kami(eallin)\nCinematographer:Hidehiko Kobayashi\nMotion Graphics Designer:yujurealworks / muen\nTitle Design:ZUMA\nProducer: Hideyuki Negishi\n──\n V.W.P are…\n・花譜_KAF\n・理芽_RIM\n・春猿火_HARUSARUHI\n・ヰ世界情緒_ISEKAIJOUCHO\n・幸祜_KOKO\n\n花谱、理芽、春猿火、异世界情绪、幸祜。\n五个具有电子头脑的魔女集结,开启新的故事篇章。\n从神椿诞生的命运相连的少女五人编织出的魔女现象。\n最强虚拟歌手组合「V.W.P」的活动必会引人瞩目。\nWe are V.W.P!!\n──\n■V.W.P\nhttps://weibo.com//7573179727","desc_v2":[{"raw_text":"爱啊、化作言灵拯救世界。\nLove, save the world as our spirit of words.\n\nV.W.P 4th Digital Single ”言霊” (Spirit of Words) \n2022.1.21(00:00)streaming&download(日本时间)\n2022.1.21(20:00)Music Video公開(日本时间)\navailable on streaming services and to download on 2022.1.21 (00:00)(日本时间)\nmusic video will be released on 2022.1.21 (20:00)(日本时间)\n\nLyric \u0026 Music \u0026 Arranged:IORI KANZAKI \nSinging:V.W.P(KAF / RIM / HARUSARUHI / ISEKAIJOUCHO / KOKO)\n\nDirector:Kenji Kawasaki(eallin)\nCG Artist:Eiji Takada(eallin)/ Wataru Kami(eallin)\nCinematographer:Hidehiko Kobayashi\nMotion Graphics Designer:yujurealworks / muen\nTitle Design:ZUMA\nProducer: Hideyuki Negishi\n──\n V.W.P are…\n・花譜_KAF\n・理芽_RIM\n・春猿火_HARUSARUHI\n・ヰ世界情緒_ISEKAIJOUCHO\n・幸祜_KOKO\n\n花谱、理芽、春猿火、异世界情绪、幸祜。\n五个具有电子头脑的魔女集结,开启新的故事篇章。\n从神椿诞生的命运相连的少女五人编织出的魔女现象。\n最强虚拟歌手组合「V.W.P」的活动必会引人瞩目。\nWe are V.W.P!!\n──\n■V.W.P\nhttps://weibo.com//7573179727","type":1,"biz_id":0}],"state":0,"duration":284,"mission_id":286690,"rights":{"bp":0,"elec":0,"download":1,"movie":0,"pay":0,"hd5":1,"no_reprint":1,"autoplay":1,"ugc_pay":0,"is_cooperation":1,"ugc_pay_preview":0,"no_background":0,"clean_mode":0,"is_stein_gate":0,"is_360":0,"no_share":0},"owner":{"mid":1636327445,"name":"VWP_虚拟魔女现象","face":"http://i2.hdslb.com/bfs/face/2c9dceb2fae106869d07cc6b4d77ae8d82330991.jpg"},"stat":{"aid":253310569,"view":70231,"danmaku":352,"reply":440,"favorite":6131,"coin":7292,"share":1307,"now_rank":0,"his_rank":0,"like":9244,"dislike":0,"evaluation":"","argue_msg":""},"dynamic":"《言霊/言灵》 / V.W.P 6【Original MV】#V.W.P##神椿工作室##言灵##花谱##理芽##春猿火##异世界情绪##幸祜#","cid":488882231,"dimension":{"width":1920,"height":1080,"rotate":0},"no_cache":false,"pages":[{"cid":488882231,"page":1,"from":"vupload","part":"言霊_220117_zhang","duration":284,"vid":"","weblink":"","dimension":{"width":1920,"height":1080,"rotate":0},"first_frame":"http://i0.hdslb.com/bfs/storyff/n220121a23b3hrqie384w81n9hjh1lj2_firsti.jpg"}],"subtitle":{"allow_submit":false,"list":[]},"staff":[{"mid":1636327445,"title":"UP主","name":"VWP_虚拟魔女现象","face":"http://i2.hdslb.com/bfs/face/2c9dceb2fae106869d07cc6b4d77ae8d82330991.jpg","vip":{"type":2,"status":1,"due_date":1647360000000,"vip_pay_type":0,"theme_type":0,"label":{"path":"","text":"年度大会员","label_theme":"annual_vip","text_color":"#FFFFFF","bg_style":1,"bg_color":"#FB7299","border_color":""},"avatar_subscript":1,"nickname_color":"#FB7299","role":3,"avatar_subscript_url":"http://i0.hdslb.com/bfs/vip/icon_Certification_big_member_22_3x.png"},"official":{"role":0,"title":"","desc":"","type":-1},"follower":26034,"label_style":0},{"mid":488970166,"title":"演唱","name":"花谱_kaf","face":"http://i1.hdslb.com/bfs/face/c0f213f5d06967bc74327a7d8886953013b8ffc0.jpg","vip":{"type":2,"status":1,"due_date":1673539200000,"vip_pay_type":0,"theme_type":0,"label":{"path":"","text":"年度大会员","label_theme":"annual_vip","text_color":"#FFFFFF","bg_style":1,"bg_color":"#FB7299","border_color":""},"avatar_subscript":1,"nickname_color":"#FB7299","role":3,"avatar_subscript_url":"http://i0.hdslb.com/bfs/vip/icon_Certification_big_member_22_3x.png"},"official":{"role":1,"title":"bilibili 知名音乐UP主","desc":"","type":0},"follower":210224,"label_style":0},{"mid":489046950,"title":"演唱","name":"理芽_RIM","face":"http://i0.hdslb.com/bfs/face/ab13251a9a58c35f620cae3794a79783d26fd7a1.jpg","vip":{"type":1,"status":0,"due_date":1643817600000,"vip_pay_type":0,"theme_type":0,"label":{"path":"","text":"","label_theme":"","text_color":"","bg_style":0,"bg_color":"","border_color":""},"avatar_subscript":0,"nickname_color":"","role":0,"avatar_subscript_url":""},"official":{"role":0,"title":"","desc":"","type":-1},"follower":76031,"label_style":0},{"mid":488978908,"title":"演唱","name":"异世界情绪","face":"http://i1.hdslb.com/bfs/face/5c0c7cb579ce12259d8262fbe4548a40c4df5898.jpg","vip":{"type":1,"status":1,"due_date":1652112000000,"vip_pay_type":0,"theme_type":0,"label":{"path":"","text":"大会员","label_theme":"vip","text_color":"#FFFFFF","bg_style":1,"bg_color":"#FB7299","border_color":""},"avatar_subscript":1,"nickname_color":"","role":1,"avatar_subscript_url":"http://i0.hdslb.com/bfs/vip/icon_Certification_big_member_22_3x.png"},"official":{"role":0,"title":"","desc":"","type":-1},"follower":84127,"label_style":0},{"mid":488976992,"title":"演唱","name":"春猿火_harusaruhi","face":"http://i2.hdslb.com/bfs/face/7207fd5f8c86ce0d2af96b052ed59fa8088ba92f.jpg","vip":{"type":1,"status":0,"due_date":1643817600000,"vip_pay_type":0,"theme_type":0,"label":{"path":"","text":"","label_theme":"","text_color":"","bg_style":0,"bg_color":"","border_color":""},"avatar_subscript":0,"nickname_color":"","role":0,"avatar_subscript_url":""},"official":{"role":0,"title":"","desc":"","type":-1},"follower":53241,"label_style":0},{"mid":701522855,"title":"演唱","name":"幸祜-koko-","face":"http://i1.hdslb.com/bfs/face/3b07090bdaa7809b1632c78de94c86980889af0a.jpg","vip":{"type":2,"status":1,"due_date":1666972800000,"vip_pay_type":0,"theme_type":0,"label":{"path":"","text":"年度大会员","label_theme":"annual_vip","text_color":"#FFFFFF","bg_style":1,"bg_color":"#FB7299","border_color":""},"avatar_subscript":1,"nickname_color":"#FB7299","role":3,"avatar_subscript_url":"http://i0.hdslb.com/bfs/vip/icon_Certification_big_member_22_3x.png"},"official":{"role":0,"title":"","desc":"","type":-1},"follower":73684,"label_style":0}],"is_season_display":false,"user_garb":{"url_image_ani_cut":""},"honor_reply":{}}}
(我**太长了6000多字)←第一次用字数统计看这玩意
这就是利用bilibili视频获取器中调用api所得返回值的全貌,我特地挑了一个联合投稿的视频让值丰富一点。
没错,一眼看上去非常复杂,这也是我想写这个教程的原因之一。
这仍然是JSON,人脑已经很难迅速理解了,当然你可以使用Notepad++、Visual Studio Code等编程软件对其手动进行格式化以便于分析及获取信息,但到这种程度了手工分拣费神费力,还是老老实实用工具吧。