Skip to content

Commit 19a4a0a

Browse files
committed
Place brackets on own lines with JsonItemExporter.
Placing the opening and closing brackets on their own lines makes it slightly easier to sort lines after the `spider_closed` signal is fired.
1 parent 8efa987 commit 19a4a0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scrapy/exporters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ def __init__(self, file, **kwargs):
100100
self.first_item = True
101101

102102
def start_exporting(self):
103-
self.file.write(b"[")
103+
self.file.write(b"[\n")
104104

105105
def finish_exporting(self):
106-
self.file.write(b"]")
106+
self.file.write(b"\n]")
107107

108108
def export_item(self, item):
109109
if self.first_item:

0 commit comments

Comments
 (0)