看到像 google 搜索,还有 leetcode 上面一些接口返回开头是)]}',想问问有人知道这是啥吗;这是特殊形式的 json 结构吗

2023-02-16 11:37:50 +08:00
 lalawu

#如题,比如请求 https://www.google.com/complete/search?q&cp=0&client=gws-wiz-serp&xssi=t&hl=zh-CN&authuser=0&pq=linux%20buffer%E5%92%8Ccache&psi=_Z_tY_2DM-uD2roPrN-ayAo.1676517374496&dpr=2 #返回的 response body 是下面,好奇前面这个)]}'是啥: )]}' [[["linux buffer 和 cache",35,[362,39],{"du":"/complete/deleteitems?client\u003dgws-wiz-serp\u0026delq\u003dlinux+buffer%E5%92%8Ccache\u0026deltok\u003dAMc44K5LtztN1jLvYQv0BR0Tcc40UAUnmA","zf":27}],["linux 磁盘数据和文件数据",35,[362,39],{"du":"/complete/deleteitems?client\u003dgws-wiz-serp\u0026delq\u003dlinux+%E7%A3%81%E7%9B%98%E6%95%B0%E6%8D%AE%E5%92%8C%E6%96%87%E4%BB%B6%E6%95%B0%E6%8D%AE\u0026deltok\u003dAMc44K5hobsUkDHq-l0MW6ktFJeoNGU9rA","zf":27}],["tremendously meaning",35,[362,39],{"du":"/complete/deleteitems?client\u003dgws-wiz-serp\u0026delq\u003dtremendously+meaning\u0026deltok\u003dAMc44K6XnnKVQy-s6M9nIumhD94cl6eW1w","zf":27}],["buffer 和 cache",35,[362,39],{"du":"/complete/deleteitems?client\u003dgws-wiz-serp\u0026delq\u003dbuffer%E5%92%8Ccache\u0026deltok\u003dAMc44K5w0qNC7CGSrZlD59zzj-RikSDBRQ","zf":27}],["pod 声明挂载 ceph",35,[362,39],{"du":"/complete/deleteitems?client\u003dgws-wiz-serp\u0026delq\u003dpod+%E5%A3%B0%E6%98%8E%E6%8C%82%E8%BD%BDceph\u0026deltok\u003dAMc44K5ANXCyU0SQ0V16-U_J0HG27GB5Ow","zf":27}],["excel 导出 文件已损坏",35,[362,39],{"du":"/complete/deleteitems?client\u003dgws-wiz-serp\u0026delq\u003dexcel%E5%AF%BC%E5%87%BA+%E6%96%87%E4%BB%B6%E5%B7%B2%E6%8D%9F%E5%9D%8F\u0026deltok\u003dAMc44K5NAtkYEXqox2zOUpkA0K8Gk8aAMg","zf":27}],["countdownlatch",35,[362,39],{"du":"/complete/deleteitems?client\u003dgws-wiz-serp\u0026delq\u003dcountdownlatch\u0026deltok\u003dAMc44K5Tg3ZcCrb61QoRmUvnNWL6PXmd8w","zf":27}],["容器 yaml ceph 声明挂载",35,[362,39],{"du":"/complete/deleteitems?client\u003dgws-wiz-serp\u0026delq\u003d%E5%AE%B9%E5%99%A8yaml+ceph%E5%A3%B0%E6%98%8E%E6%8C%82%E8%BD%BD\u0026deltok\u003dAMc44K4VZbSNJIjKj1ImDOkGyMeFL30ixg","zf":27}],["- captured an exception org.springframework.transaction.cannotcreatetransactionexception: could not open jpa entitymanager for transaction; nested exception is org.hibernate.exception.jdbcconnectionexception: unable to acquire jdbc connection",35,[362,39],{"du":"/complete/deleteitems?client\u003dgws-wiz-serp\u0026delq\u003d-+captured+an+exception+org.springframework.transaction.cannotcreatetransactionexception:+could+not+open+jpa+entitymanager+for+transaction;+nested+exception+is+org.hibernate.exception.jdbcconnectionexception:+unable+to+acquire+jdbc+connection\u0026deltok\u003dAMc44K4FN4FVyGdVaEh0hRETXLdCFxTVKg","zf":27}],["mysql max connection",35,[362,39],{"du":"/complete/deleteitems?client\u003dgws-wiz-serp\u0026delq\u003dmysql+max+connection\u0026deltok\u003dAMc44K5auK8asof-04W69dOY4ndxwOqjSA","zf":27}]],{"k":1,"q":"A-P3MtaA_qT6qRzGk3g9UfZSoJk"}]

695 次点击
所在节点    问与答
4 条回复
GuuJiang
2023-02-16 11:43:37 +08:00
防范 XSS 的
qiaobeier
2023-02-16 11:50:39 +08:00
lalawu
2023-02-16 11:54:07 +08:00
@qiaobeier 谢谢
lalawu
2023-02-16 11:55:20 +08:00
@GuuJiang 我也感觉像是防止脚本攻击,就是好奇这个特殊符号是怎么被达成共识可以放在 json 里面的,看到楼下链接了现在。谢谢嘿嘿

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/916600

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX