This article claims that 1e2 is interpreted as a string, while this other article on the front page[0] claims that 556474e378 is interpreted as a number. What's correct?<p>The YAML "Scalars" section[1] says:<p>> A few examples also use the int, float and null types from the JSON schema.<p>And includes these examples:<p><pre><code> canonical: 1.23015e+3
exponential: 12.3015e+02
</code></pre>
So, is the "+" required here or not? Is a YAML parser buggy if it doesn't parse all JSON numbers as numbers?<p>Edit: Ah, further on, it says:<p><pre><code> Canonical Form
Either 0, .inf, -.inf, .nan or scientific notation matching the regular expression
-? [1-9] ( \. [0-9]* [1-9] )? ( e [-+] [1-9] [0-9]* )?
</code></pre>
The example 1e2 clearly matches this regex, so his YAML parser is broken.<p>Edit edit:<p>In YAML 1.1, there were separate definitions of float[2] and int[3] types, where only floats support "scientific" notation, and must have a ".", unlike JSON.<p>So this article is talking about YAML 1.1, while the other article is talking about YAML 1.2.<p>[0] <a href="https://news.ycombinator.com/item?id=41498264">https://news.ycombinator.com/item?id=41498264</a><p>[1] <a href="https://yaml.org/spec/1.2.2/#23-scalars" rel="nofollow">https://yaml.org/spec/1.2.2/#23-scalars</a><p>[2] <a href="https://yaml.org/type/float.html" rel="nofollow">https://yaml.org/type/float.html</a><p>[3] <a href="https://yaml.org/type/int.html" rel="nofollow">https://yaml.org/type/int.html</a>