Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fix for issue #157 - go-yaml should handle invalid integers as strings #223
Conversation
dsnet
and others
added some commits
Nov 1, 2016
jvehent
referenced this pull request
Jan 9, 2017
Open
Comment marshaling and unmarshaling support #219
|
It's not clear to me how this is fixing the referenced issue in a proper way. What's the actual specification of the float format in yaml, and how is this handling it? Where are the tests for it showing details of the problem being fixed? |
vinzenz
commented
Jan 25, 2017
•
ParseFloat is behaving oddly by discarding the leading 0 and make the rest of the number a float.
http://yaml.org/spec/1.2/spec.html#tag/repository/float
I will add some test that would fail before |
|
Note that this changed from yaml 1.1 to 1.2. It might be okay, but we may also end up breaking existing code. In Python:
Thanks for the tests. |
|
Curiously, Python float resolution seems broken in other ways:
|
vinzenz
commented
Jan 25, 2017
|
#171 seems to actually fix this already |
vinzenz
commented
Jan 25, 2017
|
And we can also add this as a parser option (Strict floats) like it was introduced as another PR |
|
Indeed, merged #171. Thanks for your help on this. |
vinzenz commentedNov 3, 2016
No description provided.