API behavior for empty fields / null values


It appears that the record objects returned from the API are dropping any fields that do not have a value. Except in the case of linked table fields, then the field is there but the value is an empty array. This behavior is unexpected for me and I have a few questions…

  1. Is the behavior I described in fact the existing/intended behavior? Or am I missing something?
  2. If so, then this is unexpected for me because:
  • Empty values are being represented inconsistently based on field type. Why represent a null text field as a field that doesn’t exist, and a null linked records field as an empty collection?

  • I would expect to see fields that I know to be in my table to be faithfully represented in the API, even when those fields have null values.

  • I have to inspect every single record to see what fields it has before I can reliably map it onto a model object. This is less than ideal for several (obvious?) reasons.

I noticed this behavior when using the Ruby client, but curl produces the same result.


Anything from Airtable on this?