jeremyfa / yaml.js

Standalone JavaScript YAML 1.2 Parser & Encoder. Works under node.js and all major browsers. Also brings command line YAML/JSON conversion tools.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

convert issue of string "ON","OFF"

785172550 opened this issue · comments

json: 
var obj = {
 'key1':'ON'
}

res = YAML.dump(obj)

yml : 
key: ON

but ON is not a string in yaml(it's a boolean value), it's should be 'ON'.

refer:
https://yaml.org/type/bool.html

On Yaml 1.2, ON and OFF are strings so this is the expected behaviour.