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

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -