MuleSoft Certified Developer – Level 1 — Question 53
Does a root element need when creating a response using Dataweave?
Answer options
- A. None of these
- B. Sometimes
- C. Never
- D. Always
Correct answer: B
Explanation
The correct answer is 'Sometimes' because while a root element is not always mandatory in every Dataweave response, there are situations where it is necessary to ensure the response is well-formed. The other options are incorrect as 'Always' and 'Never' imply absolute requirements that do not account for varying use cases.