cannot dump IP address as String
Issue #328
resolved
I'm using SnakeYAML 1.11 in Java 7 / Java 8. Say I have a map of "hostname" and "127.0.0.1", and want to dump it as a yaml file.
Map<String, String> config = new HashMap<String, String>();
config.put("hostname", "127.0.0.1");
Yaml yaml = new Yaml();
yaml.dumpAsMap(config);
The output is {hostname: 127.0.0.1} instead of {hostname: "127.0.0.1"} and the former won't be loaded as String.
Comments (2)
-
-
Account Deleted - changed status to resolved
sorry, I cannot reproduce this now. Close it.
- Log in to comment
What 127.0.0.1 will be loaded as ? Which parser do you use to load ?