Meaning of null favorite_count


#1

Silly question, but I’m double checking my assumption - favorite_count in https://dev.twitter.com/docs/platform-objects/tweets is listed as nullable. If this field is null, is that equivalent to saying that the favorite count is 0? Is this a valid generalization to make about all nullable count fields?

Joe


#2

It can be a convenient way to assess a null value in this field for sure. The state of null is usually reached because it was not possible at the time of servicing the request to provide a value in that field – an underlying system could have taken too long to respond, or a null value got cached at some other point in time when that happened.

I guess it would depend on your users – would they prefer a “indeterminate” (or undetermined) state or “zero” value that may be inaccurate?


#3

Good to know - thanks.