Skip to content

Commit aa2dd64

Browse files
committed
Fixed the transform json to json bug
Signed-off-by: Chin Yeung Li <[email protected]>
1 parent 3ad58a7 commit aa2dd64

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/attributecode/transform.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ def transform_json_to_json(location, output, transformer):
8383
raise ValueError('Cannot transform without Transformer')
8484

8585
items = read_json(location)
86-
data = strip_trailing_fields_json(items)
87-
new_data = normalize_dict_data(data)
86+
data = normalize_dict_data(items)
87+
new_data = strip_trailing_fields_json(data)
8888

8989
field_names, updated_data, errors = transform_data(new_data, transformer)
9090

@@ -109,8 +109,8 @@ def strip_trailing_fields_json(items):
109109
Strip trailing spaces for field name #456
110110
"""
111111
data = []
112-
od = OrderedDict()
113112
for item in items:
113+
od = OrderedDict()
114114
for field in item:
115115
stripped_field_name = field.strip()
116116
od[stripped_field_name] = item[field]

0 commit comments

Comments
 (0)