Add helper for simple json responses.

Added a helper that simplifies code returning JSON HTTP responses.