Trailing commas in CSVs are now treated as empty fields.

Empty fields are now treated as empty strings rather than nulls
in tippecanoe-json-tool, for consistency with tile-join.
This commit is contained in:
Eric Fischer
2018-05-24 13:54:00 -07:00
parent 32b3a15406
commit 54532795f6
10 changed files with 35 additions and 25 deletions
+5
View File
@@ -27,6 +27,11 @@ std::vector<std::string> csv_split(const char *s) {
while (*s && isspace(*s)) {
s++;
}
if (*s == '\0' || *s == '\r' || *s == '\n') {
ret.push_back(std::string(""));
break;
}
}
}