Force template body to a JSON string if enumerable is detected