Posts

How to define a file format

Image
Specifying a file format isn't just about deciding the structure (CSV, JSON, XML, etc.) and the fields that should be present in the file. Having been through the exercise recently in a collaborative exercise with the UK's OOH advertising industry, I've collated a checklist of things to consider. One of the key lessons that came out of my recent work is that there should be no room for ambiguity. Be explicit in your specification. If the filename to be used does not matter to your solution, then say that. Don't just fail to mention filenames. Checklist Here's my checklist. I'd welcome feedback on other factors which I've not included. The file format (e.g. JSON, CSV, XML, TSV, etc.) The filename to be used. Is there a specific format? Should it be unique (and if so, over what period of time?) What filename extension should be used? Is it case sensitive? Character encoding (e.g. UTF-8) Carriage return format (CR, LF, CRLF). Must the final line of the file end