Instead of returning null for certain keys in the API responses, consider returning 0 for numeric values or an empty array [] for values that, if populated, would normally return an array.
This would make interfacing with the API much easier for Javascript/Typescript (possibly other languages as well).
Instead of returning
null
for certain keys in the API responses, consider returning0
for numeric values or an empty array[]
for values that, if populated, would normally return an array.This would make interfacing with the API much easier for Javascript/Typescript (possibly other languages as well).
Example Candidates: