Closed simonw closed 4 years ago
Since fields are returned as nested JSON this is in line with how the JSON spec works.
BUT... the YAML serialization does care about order. So if Airtable's API randomly returns fields in a different order it will produce different YAML, which means if it's being kept in a git repo you'll get a pointless commit - e.g. this one: https://github.com/natbat/rockybeaches/commit/96acfae66b89606e40e1d54fc4059e9744e010a4
Fix is to change sort_keys to True here: https://github.com/simonw/airtable-export/blob/d6113f630182fa5b8f8bd328aa77f4b4033aab0d/airtable_export/cli.py#L42
sort_keys
True
JSON export in #2 will need to do this too.
Since fields are returned as nested JSON this is in line with how the JSON spec works.
BUT... the YAML serialization does care about order. So if Airtable's API randomly returns fields in a different order it will produce different YAML, which means if it's being kept in a git repo you'll get a pointless commit - e.g. this one: https://github.com/natbat/rockybeaches/commit/96acfae66b89606e40e1d54fc4059e9744e010a4