WP-API / docs-v2

Documentation for version 2 of the API
http://v2.wp-api.org
58 stars 76 forks source link

Document convention around returning `null` for known-but-undefined values #174

Open kadamwhite opened 8 years ago

kadamwhite commented 8 years ago

See WP-API/WP-API#2657 for the relating discussion: One of the conventions of the WordPress REST API is that if a value is undefined for a specific key that should be part of a response, the API should provide null as the value for that key. Receiving a null value therefore means, "we know and understand this field, and it lacks a value".