convert symbols to strings (i.e. strip leading :)
emanresusername opened this issue · comments
Jordan Gwyn commented
was just porting some stuff over from ruby and ran into this. super hard to catch even staring right at it :(
require 'yaml'
yaml_string = [:symbol].to_yaml
# => "---\n- :symbol\n"
YAML.loadyaml_string)
# => [:symbol]
import io.circe.yaml.parser
val yamlString = "---\n- :symbol\n"
parser.parse(yamlString).right.get
// actual: [":symbol"]
// prefer: ["symbol"]
jeremyrsmith commented
@emanresusername I don't think this is part of YAML, moreso a behavior of Ruby. Does the YAML specification describe special handling for leading :
? If so, please reopen.