回答編集履歴
1
d
test
CHANGED
@@ -13,8 +13,6 @@
|
|
13
13
|
import re
|
14
14
|
|
15
15
|
from collections import OrderedDict
|
16
|
-
|
17
|
-
from io import StringIO
|
18
16
|
|
19
17
|
|
20
18
|
|
@@ -38,11 +36,13 @@
|
|
38
36
|
|
39
37
|
|
40
38
|
|
41
|
-
|
39
|
+
j = json.dumps(data, indent=2, ensure_ascii=False)
|
42
40
|
|
43
|
-
|
41
|
+
# 正規表現でキーの引用符を消す。
|
44
42
|
|
45
|
-
j = re.sub(r'"(\w+?)":', r'\1:',
|
43
|
+
j = re.sub(r'"(\w+?)":', r'\1:', j)
|
44
|
+
|
45
|
+
|
46
46
|
|
47
47
|
with open('data.json', 'w') as f:
|
48
48
|
|