circe / circe-yaml

YAML parser for circe using SnakeYAML

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

convert symbols to strings (i.e. strip leading :)

emanresusername opened this issue · comments

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"]

@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.