:boom: [Workaround] Same line broken into multiple chunks
Browse files
converters/stream_jsonizer.js
CHANGED
@@ -14,8 +14,12 @@ export function jsonize_stream_data(data) {
|
|
14 |
return line.trim().length > 0;
|
15 |
})
|
16 |
.map(function (line) {
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
19 |
});
|
20 |
return json_chunks;
|
21 |
}
|
|
|
14 |
return line.trim().length > 0;
|
15 |
})
|
16 |
.map(function (line) {
|
17 |
+
try {
|
18 |
+
// ToFix: Single line broken into multiple chunks
|
19 |
+
json_chunks.push(JSON.parse(line.trim()));
|
20 |
+
} catch {
|
21 |
+
console.log(`Failed to parse: ${line}`);
|
22 |
+
}
|
23 |
});
|
24 |
return json_chunks;
|
25 |
}
|