cuizhennan / snakeyaml

Automatically exported from code.google.com/p/snakeyaml
Apache License 2.0
1 stars 0 forks source link

Magic behavior #164

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. (new Yaml(new SafeConstructor)).load("1024:1") => 61441 -- why?

What version of SnakeYAML are you using? On what Java version?

jdk 7, SnakeYAML 1.10

Original issue reported on code.google.com by apanase...@griddynamics.com on 5 Dec 2012 at 3:14

GoogleCodeExporter commented 9 years ago
This is as specified:
http://yaml.org/type/index.html

Check sexagesimal format:
http://yaml.org/type/int.html
sexagesimal: 190:20:30

Original comment by py4fun@gmail.com on 5 Dec 2012 at 4:02

GoogleCodeExporter commented 9 years ago
oh, thx %)

Original comment by apanase...@griddynamics.com on 5 Dec 2012 at 4:05

GoogleCodeExporter commented 9 years ago
You can use double quotes to avoid parsing the value as an integer.

Original comment by py4fun@gmail.com on 5 Dec 2012 at 5:07

GoogleCodeExporter commented 9 years ago
I hope in YAML 2 all this magic is removed.

Original comment by py4fun@gmail.com on 6 Dec 2012 at 7:49