Normally, I would post this on the github issue tracker, but it does not exist. See https://github.com/HackerNews/API.<p>The API returns "null" when an "Item" doesn't exist.<p>Example: https://hacker-news.firebaseio.com/v0/item/1607092358902384905.json?print=pretty<p>RFC 4627 specifies that the returned JSON must be either an <i>object</i> or an <i>array</i>. This is neither. Please help. Thank you.<p>Suggestion:
Instead of "null", can you make it"{ \"item\" : null }" ?<p>Warmest Regards
The API returns JSON values per RFC 4627 and RFC 7159. null is a valid value. This allows clients to request only what they want:<p>Entire item: <a href="https://hacker-news.firebaseio.com/v0/item/8422599.json" rel="nofollow">https://hacker-news.firebaseio.com/v0/item/8422599.json</a><p>Just one property: <a href="https://hacker-news.firebaseio.com/v0/item/8422599/kids.json" rel="nofollow">https://hacker-news.firebaseio.com/v0/item/8422599/kids.json</a><p>Also, please send API correspondence to api@ycombinator.com.
I'm more surprised that they're returning a 200 when an item doesn't exist. If they'd just return a 404, per usual, the content of the body wouldn't really matter. (in my opinion)