YAML.jl
YAML.jl copied to clipboard
0-leaded int not parsed
All numbers starting with a leading "0" are parsed as octal. If the number is something like 0329 it fails to be parsed with ArgumentError since 9 is not in the possible range of values. I'd fall-back to a base-10 parse or to a string conversion. yamllint keeps them as-is (03 is 3, 011 is 9, 019 is 019)
Having 011 parse to 9 and 11 parse to 11 seems very confusing to me. Is there precedent for this behavior?
python yaml:
yaml.safe_load("011") 9 yaml.safe_load("11") 11 yaml.safe_load("09") '09'