Open GregE-369 opened 4 years ago
There definitely seems to be an issue with booleans. My experience is that values of true show up but false doesn't. However, I tried your sample and seemed to get mixed results. Still never saw a "false" value make it into the sheet.
The issue seems to be in the defaultTransform_ function. In there, there is a block where values are automatically transformed into a string and cut to max 256 characters. To prevent this from happening, you can add the noTruncate option and/or modify that bit of code:
=importjson("https://data.ncaa.com/casablanca/scoreboard/football/fbs/2019/14/scoreboard.json";;"noTruncate")
Or replace:
if (!hasOption_(options, "noTruncate") && data[row][column]) {
data[row][column] = data[row][column].toString().substr(0, 256);
}
By:
if (!hasOption_(options, "noTruncate") && data[row][column]) {
if ((typeof data[row][column]) === 'number' || (typeof data[row][column]) === 'boolean') {
data[row][column] = data[row][column];
} else {
data[row][column] = data[row][column].toString().substr(0, 256);
}
}
values of true are output as text values while values of false are output as boolean values.
example file: https://data.ncaa.com/casablanca/scoreboard/football/fbs/2019/14/scoreboard.json
best regards, GregE