javascript浏览器控制台读取JSON的问题
我想读取的数据的网址是百度云上身份证识别的一个地址:
https://aip.baidubce.com/rest/2.0/ocr/v1/idcard?access_token=24.3074598030d473298e5197a463dd4a7f.2592000.1504252081.282335-9863126
需要传上的参数是:
id_card_side:front(代表身份证正面)back(代表身份证反面)
image:【图片Base64编码,需encodeURIComponent()】
正常访问参数传正确的数据:
{
"log_id": 525464404,
"words_result_num": 6,
"image_status": "normal",
"words_result": {
"住址": {
"location": {
"width": 337,
"top": 320,
"height": 75,
"left": 176
},
"words": "山东省五莲县城关沿河路398号6号楼3单元205室"
},
"出生": {
"location": {
"width": 0,
"top": 0,
"height": 0,
"left": 0
},
"words": "19871116"
},
"姓名": {
"location": {
"width": 92,
"top": 91,
"height": 33,
"left": 183
},
"words": "权志龙"
},
"公民身份号码": {
"location": {
"width": 444,
"top": 512,
"height": 32,
"left": 341
},
"words": "371121198711160018"
},
"性别": {
"location": {
"width": 0,
"top": 0,
"height": 0,
"left": 0
},
"words": "男"
},
"民族": {
"location": {
"width": 23,
"top": 169,
"height": 28,
"left": 391
},
"words": "汉"
}
}
}
我需要识别出来的数据,js的代码怎么去写呢?
https://aip.baidubce.com/rest/2.0/ocr/v1/idcard?access_token=24.3074598030d473298e5197a463dd4a7f.2592000.1504252081.282335-9863126
需要传上的参数是:
id_card_side:front(代表身份证正面)back(代表身份证反面)
image:【图片Base64编码,需encodeURIComponent()】
正常访问参数传正确的数据:
{
"log_id": 525464404,
"words_result_num": 6,
"image_status": "normal",
"words_result": {
"住址": {
"location": {
"width": 337,
"top": 320,
"height": 75,
"left": 176
},
"words": "山东省五莲县城关沿河路398号6号楼3单元205室"
},
"出生": {
"location": {
"width": 0,
"top": 0,
"height": 0,
"left": 0
},
"words": "19871116"
},
"姓名": {
"location": {
"width": 92,
"top": 91,
"height": 33,
"left": 183
},
"words": "权志龙"
},
"公民身份号码": {
"location": {
"width": 444,
"top": 512,
"height": 32,
"left": 341
},
"words": "371121198711160018"
},
"性别": {
"location": {
"width": 0,
"top": 0,
"height": 0,
"left": 0
},
"words": "男"
},
"民族": {
"location": {
"width": 23,
"top": 169,
"height": 28,
"left": 391
},
"words": "汉"
}
}
}
我需要识别出来的数据,js的代码怎么去写呢?
...全文
相关推荐
JS 读取Excel文件(xls) 兼容Chrome/IE/Firefox
JS 读取Excel文件(xls) 兼容Chrome/IE/Firefox 文章配套工具
【一种使用浏览器读取本地excel、josn等数据文件的方法】Python+JavaScript+HTML实现
一般来说,为了网络访问安全,浏览器是不能直接加载本地文件的,IE内核的浏览器提供了AX控件实现本地文件的读取,Chrome 86 版本后也提供了相应的API,但都存在使用限制和兼容性问题。有时开发者只是想利用浏览器编制一些简单的脚本完成一些任务,不想学习C、C++、Python生成exe这么大动作,例如使用JavaScript脚本读取本地一个excel文件进行统计分析。但由于浏览器无法使用本地文件这个限制,只好放弃。本文讨论研究一种非IE内核浏览器读取本地excel数据的方法,绕开这个限制。
JWConsole:游戏机控制台
游戏机控制台 Joywok 平台的控制台。 描述 安装 首先确保你已经安装了 Node、Npm、Bower 和 Gulp。 安装 凉亭安装 吞服
输入输出_magicxt6_javascript_输出_输入_阿里_
Java Script的输入输出,适用于在线笔试编程题(滴滴、阿里、腾讯等)
console-decoders:控制台的有效载荷解码器功能
控制台解码器 控制台的负载解码器功能。 在每个设备目录中,将decoder.js 的内容复制到 Helium 控制台的自定义脚本窗口中。


