首页 新闻 会员 周边

找出key为camera_idx的值 提示:需要用到json或simplejson的库

0
[已解决问题] 解决于 2018-07-06 10:59

{
"1":
{
"body": {
"task": {
"object_type": "OBJECT_FACE",
"source_address": "{{common.build_rtsp_url('{{common.get_rtsp_url
()}}','rtsp://admin:admin1234@172.20.13.126:554')}}",
"task_id": "",
"camera_info": {
"device_type": "{{image.random_str_re('^[a-z]{10,20}$')}}",
"internal_id": {
"region_id": 1,
"camera_idx": 100
},
"place_code": "{{image.random_str_re('^[0-9]{1,5}$')}}",
"tollgate_id": "9",
"tollgate_name": "{{image.random_str_re('^[0-9]{1,5}$')}}",
"source_id": "{{image.random_str_re('^[0-9]{1,5}$')}}",
"place_name": "{{image.random_str_re('^[\\w]{3,5}$')}}",
"device_id": "{{image.random_str_re('^[0-9]{1,5}$')}}"
}
}
},
"title": "camera_id=??",
"url": "{{common.url('url_video_process')}}",
"rest": "/v1/tasks",
"response": {
"task": {
"includekey": [
"creation_time",
"object_type",
"source_address",
"task_id",
"camera_info"
],
"type": "dict"
},
"region_id": {
"type": "int"
},
"task_id": {
"re": "^[0-9]{0,40}$",
"type": "str"
},
"object_type": {
"in": [
"OBJECT_FACE",
"OBJECT_FACE"
]
},
"camera_info": {
"includekey": [
"internal_id",
"tollgate_id",
"source_id",
"device_id"
],
"type": "dict"
},
"internal_id": {
"includekey": [
"region_id",
"camera_idx"
],
"type": "dict"
},
"password?": {
"=": "{{key.password}}"
},
"camera_idx": {
"type": "int"
},
"source_address": {
"=": "{{common.build_rtsp_url('{{common.get_rtsp_url
()}}','rtsp://admin:admin1234@172.10.23.23:554')}}"
}
},
"key": [
"task_id"
],
"method": "POST",
"wait": 120000
},
"2":
{
"url": "{{common.url('url_video_process')}}",
"title": "task_id?1?5????",
"method": "GET",
"rest": "/v1/tasks/{{key.task_id}}",
"response": {
"status.status":{"=":"OK"}
},
"teardown": [
"delete",
"video_process"
]
}
}

yyx何以言欢的主页 yyx何以言欢 | 菜鸟二级 | 园豆:202
提问于:2018-05-25 15:13
< >
分享
最佳答案
0

不知道你想要实现什么功能,按照你说的只是找到值的话,直接遍历josn对象就可以啊

奖励园豆:5
斧子兔 | 菜鸟二级 |园豆:218 | 2018-05-25 15:20

这是我朋友给我出的题  不知道怎么遍历

yyx何以言欢 | 园豆:202 (菜鸟二级) | 2018-05-25 15:24

@yyx何以言欢: json对象啊 和普通对象类似 看你用什么语言呢

斧子兔 | 园豆:218 (菜鸟二级) | 2018-05-29 16:18
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册