set types for sending json back to the browser