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.
This commit is contained in:
Patrick Connolly 2016-04-24 14:55:08 -04:00 committed by Paul Tremberth
parent 19b585361e
commit 9c29215bef
1 changed files with 2 additions and 2 deletions

View File

@ -100,10 +100,10 @@ class JsonItemExporter(BaseItemExporter):
self.first_item = True
def start_exporting(self):
self.file.write(b"[")
self.file.write(b"[\n")
def finish_exporting(self):
self.file.write(b"]")
self.file.write(b"\n]")
def export_item(self, item):
if self.first_item: