Skip to content

Commit

Permalink
ndjson
Browse files Browse the repository at this point in the history
  • Loading branch information
hynky1999 committed May 22, 2023
1 parent 7346224 commit a86aa51
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmoncrawl/aggregator/utils/ndjson.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import json


class Decoder(json.JSONDecoder):
def decode(self, s: str, *args, **kwargs):
lines = f"[{','.join(s.splitlines())}]"
return super(Decoder, self).decode(lines, *args, **kwargs)

0 comments on commit a86aa51

Please sign in to comment.