Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions json_to_csv/json_to_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,6 @@ def read_jsons_chunks(file_object, chunk_size=10000):

# Initialize those
example = ""
c_bef = ""
c_2bef = ""
continue
# If we are in between 2 json examples or at the beginning
elif c in ['[', ',', '\n'] and nb_bracket == 0 and nb_quotes % 2 == 0:
Expand All @@ -251,10 +249,7 @@ def read_jsons_chunks(file_object, chunk_size=10000):
count_escape_char = 0
# Append character to the json example
example += c

# Set previous characters
c_2bef = c_bef
c_bef = c

# If at the end of the chunk, read new chunk
if k == len(chunk) - 1:
chunk = file_object.read(1000000)
Expand Down