Open tapankavasthi opened 7 months ago
Sample Yaml:
- 123 - 456 - -23
Sample code:
val parsedData: List<Any?> = Yaml.Default.decodeListFromString(yamlStr)
Discrepancy:
Expected [123, 456, -23] Actual [123, 456, [23]]
For the last entry, the parser treats it as a start of another list, instead of considering it as a negative number.
As per the specs, there must be a space after the dash for a list component.
Steps to reproduce
Sample Yaml:
Sample code:
Discrepancy:
For the last entry, the parser treats it as a start of another list, instead of considering it as a negative number.
As per the specs, there must be a space after the dash for a list component.