【发布时间】:2016-09-27 13:26:21
【问题描述】:
这是我的输出:
xyz information
+-----+------+------+
| A | B | C |
+-----+------+------+
| 23 | 76 | 87 |
| 76 | 36 | 37 |
| 83 | 06 | 27 |
+-----+------+------+
我想在 python 中将此输出转换为 json 格式 任何人都可以建议如何做到这一点。
【问题讨论】:
-
使用python2.7,它是我写的命令的输出。
-
您可以尝试将输出转换为dict而不是table,然后将dict转换为Json。
标签: python json python-2.7