|
发表于 2021-9-17 12:05:00
|
显示全部楼层
如果是写入文件 则这样写:
- import json
- f=open("cgf.json","r")
- data=json.load(f)
- print(data)
复制代码
其中 CGF.JSON 文件内容如下:
- {
- "/Common/SZ_ChinaTel_download.multipay_https": {
- "destination": "/Common/218.17.210.243:443 ",
- "ip-protocol": "tcp",
- "mask": "255.255.255.255",
- "policies": {
- "/Common/BestSecurityPolicy": ""
- },
- "pool": "/Common/download.multipay_pool",
- "profiles": {
- "/Common/all_prefix.multipay.cmbchina.com": {
- "context": "clientside"
- },
- "/Common/http": {},
- "/Common/tcp": {},
- "/Common/websecurity": {}
- },
- "security-log-profiles": "/Common/arcsight ",
- "source": "0.0.0.0/0",
- "source-address-translation": {
- "pool": "SNAT_PL_1.1.1.1",
- "type": "snat "
- },
- "translate-address": "enabled",
- "translate-port": "enabled",
- "vlans": "/Common/VLAN_CT",
- "vlans-enabled": ""
- }
- }
复制代码 |
|