A zero value is the empty or numerically zero representation used when a type or format has no distinct null or missing state. It often becomes the default, but it cannot show whether the user intentionally chose that value. section 5.2 section 5.3.2
Treat zero values as API design constraints:
- A Boolean zero value usually means false, so unset and explicitly false become indistinguishable. section 5.2
- Using zero as a numeric default marker prevents clients from intentionally specifying zero. section 5.3.2
- Naming a Boolean for the desired zero-value behavior can solve an immediate default problem but locks that default into the field name. section 5.2
- An empty map can express “no data,” while a null map can request API-selected behavior; do not collapse the two. section 5.7.2
Chat room permissions
Suppose a ChatRoom exposes allowChatbots. If the format supplies only a Boolean zero value, a newly created room receives false whether the user omitted the field or explicitly prohibited chatbots. A negative name such as disallowChatbots can make false produce an intended permissive default, but changing that default later becomes difficult. section 5.2
Listing 5.1 A ChatRoom resource with a Boolean flag
interface ChatRoom {
id: string;
// ... #1
archived: boolean; #2
allowChatbots: boolean; #3
}
Inspect the ChatRoom resource shape and its Boolean permission flag. section 5.2




