Based on #2037 (comment)
Turning a DataFrame into JSON ignores all columns that are not value- or array columns if they exist:
If we read
DataFrame.readJsonStr( """[1,{"label":"record"},null]""")
we get:
String? Int?
---- ----
0 null 1
1 record null
2 null null
and then .toJson():
label: "record" has been lost.
Expected behavior
DataFrame.readJsonStr( """[1,{"label":"record"},null]""").toJson()
should return values from (correctly recognized) array and value columns back into the JSON array, like:
[1,{"label":"record"},null]
(Related: #2046 our array column detection is completely broken because it checks for null values, however, array columns are created with emptyList() instead.)
Based on #2037 (comment)
Turning a DataFrame into JSON ignores all columns that are not value- or array columns if they exist:
If we read
we get:
and then
.toJson():label: "record"has been lost.Expected behavior
should return values from (correctly recognized) array and value columns back into the JSON array, like:
(Related: #2046 our
arraycolumn detection is completely broken because it checks fornullvalues, however, array columns are created withemptyList()instead.)