Comment

Comment by tomblomfield

I'm not really sure where the idea that JSON APIs are hard to test came from?

They're actually really simple to test because the returned data is in a machine-readable format - JSON. Simply parse the JSON into a data structure that your language understands (hash, array?), and make assertions about the content. The end.

parent tomblomfield 15 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton