Closed Krzysztof-Kolodziejczyk closed 6 months ago
The example is invalid YAML, because the last line of
example: [{
"category": "BAD_REQUEST"
}]
is insufficiently indented.
This library makes a specific affordance for cases when the last line contains exactly one flow-collection terminator which has its start on the same line as the mapping key, as in:
example: [
{ "category": "BAD_REQUEST" }
]
I am not comfortable with expanding this affordance and deviation from the spec further to cover your case.
Example file:
For this case Error element won't be in result object due to
[
character under"category": "BAD_REQUEST"
.For above scenario text is parsed correctly.