google / google/transit

Empty strings and quotation marks

Open
#583 1 comment 0 reactions 0 assignees View on GitHub
Change type: Functional GTFS Schedule
Dominant language
No language data
Stars
1.1k
Forks
225
Avg merge
7d 17h
Merged PRs (30d)
3

Description

The reference is unclear about the handling of empty strings. I conclude that an empty string as a field value shall be interpreted as if that field don't have a value (except for enums where empty has a specified meaning), but it needs to be clarified in the reference. The reference should also clarify that a **required** field must not contain an empty string and that an **ID** must not be empty (for example, in routes.txt, if network_id is an empty string, it means that the route has no network_id, not that it has an empty string as network_id.

What if a field contains two quotation marks and nothing more ("")? Most parsers would probably handle that the same way as an empty string (no value), but it should be clarified in the reference.

By the way, is it allowed to enclose a field value with quotation marks even if the field value doesn't contain quotation marks or commas? The reference doesn't specify that. For example "field value" (with quotation marks), should that be interpreted as field value (without quotation marks) or is that an error? This should also be clarified in the reference.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.