We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 201a7d3 commit 0fcfcf3Copy full SHA for 0fcfcf3
src/datasets/packaged_modules/json/json.py
@@ -105,7 +105,8 @@ def _cast_table(self, pa_table: pa.Table) -> pa.Table:
105
.to_json(orient="records", lines=True)
106
)
107
string_array = pa.array(
108
- ("{" + x.rstrip() for x in ("\n" + jsonl).split("\n{") if x), type=pa.string()
+ (None if x.strip() == "null" else x.strip() for x in jsonl.split("\n") if x.strip()),
109
+ type=pa.string(),
110
111
pa_table = pa_table.set_column(i, column_name, string_array)
112
# more expensive cast to support nested structures with keys in a different order
0 commit comments