Emit correct mimetype if returning JSON data. Diazo is confused if response is text/plain and wraps it with HTML doctype and body