Salesforce Certified MuleSoft Integration Foundations free question 4 / 10 · Domain 2: Recognize and interpret essential integration concepts and terminology
Which statement about the maxEntityCount property of the YAML format in DataWeave matches the documentation?
- It defaults to 1 and limits entity expansions, which helps avoid Billion Laughs attacks
- It defaults to 8192 and sets the size, in bytes, of the buffer that the writer uses for output
- It defaults to 1 and caps the number of YAML documents that can follow one another in a single input
- It has no default, and a value of 0 makes the reader skip counting entity expansions
Show the answer and explanation
Answer: A
Why this is correct
The Reader Properties table lists maxEntityCount as a Number with a default of 1. Its description says that it sets the maximum number of entity expansions and that the limit helps avoid Billion Laughs attacks. The correct choice combines that default and that purpose. Two of the wrong choices borrow a detail from elsewhere on the page: the 8192 default belongs to the writer property bufferSize, and the default of 1 is paired with a purpose the table does not give.
Why the other options are wrong
"It defaults to 8192 and sets the size, in bytes, of the buffer that the writer uses for output" … The 8192 default belongs to the writer property bufferSize. maxEntityCount is a reader property, listed under Reader Properties.
"It defaults to 1 and caps the number of YAML documents that can follow one another in a single input" … The default of 1 is correct, but the description is not. The property limits entity expansions, which is how the documentation links it to Billion Laughs attacks.
"It has no default, and a value of 0 makes the reader skip counting entity expansions" … The page lists a default of 1 for the property, and it does not describe 0 as a way to turn the counting off.
Reader and writer properties on the same page
The page separates properties for reading from properties for writing. Writer properties such as bufferSize, deferred, encoding, skipNullOn, and writeDeclaration change how the output is produced.