java - SnakeYaml dump automatically converts numbers(represented as Strings) -


i using yaml dump method create configuration file object. have following code:

map<string, string> map = new hashmap<>(); map.put("phonenumber","7285042388"); map.put("name","cristina"); dumperoptions dumperoptions1 = new dumperoptions(); dumperoptions1.setdefaultflowstyle(dumperoptions.flowstyle.block); yaml yaml2 = new yaml(dumperoptions); system.out.println(yaml2.dump(map));` 

output:

phonenumber: '7285042388'  name: cristina 

i want phone number shown without single quotes. i've noticed using map object type values solves this, need values type string. how solve this?


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -