[root@mysql-host1 ~]# cat 1.json {"version":"0.1","database":"app01","table":"tb1","type":"insert","ts":1659678099,"time_zone":"Asia/Shanghai","host":"10.0.0.11","data":{"c1":"47527851-1481-11ed-9d0d-000c2911ac8b","c2":"mysql-host1","c3":"3306","c4":"/data/mysql/mysql3306/data/","c5":"/tmp/mysql3306.sock","create_time":"2022-08-05 13:41:39","id":"16","update_time":"2022-08-05 13:41:39"},"old":{},"pks":{"id":"16"}} [root@mysql-host1 ~]# cat 1.json | python3 -mjson.tool { "version": "0.1", "database": "app01", "table": "tb1", "type": "insert", "ts": 1659678099, "time_zone": "Asia/Shanghai", "host": "10.0.0.11", "data": { "c1": "47527851-1481-11ed-9d0d-000c2911ac8b", "c2": "mysql-host1", "c3": "3306", "c4": "/data/mysql/mysql3306/data/", "c5": "/tmp/mysql3306.sock", "create_time": "2022-08-05 13:41:39", "id": "16", "update_time": "2022-08-05 13:41:39" }, "old": {}, "pks": { "id": "16" } }
标签:tool,mysql,41,json,模块,time,data,id From: https://www.cnblogs.com/zhouwanchun/p/16588129.html