Set JSON content type if it's missing & we encode an object