The first two headers prevent the browser from caching the response and the third sets the correct MIME type for JSON.

Than just output your JSON data