Skip to content

YamlConverter from JsonNode to Yaml adds extra quotes #2561

@baywet

Description

@baywet

Describe the bug
Given the following input

{
   "fooString": "fooStringValue",
   "fooStringOfNumber": "200"
}

calling

var yamlNode = jsonNode.ToYamlNode();
using var ms = new MemoryStream();
var yamlStream = new YamlStream(new YamlDocument(jsonNode.ToYamlNode()));
var writer = new StreamWriter(outputStream);
yamlStream.Save(writer);
ms.Seek(0);

And reading the string value leads to the following result

fooString: '"fooStringValue"'
fooStringOfNumber: 200

Expected behavior
A clear and concise description of what you expected to happen.

fooString: fooStringValue
fooStringOfNumber: "200"

Metadata

Metadata

Assignees

Labels

type:bugA broken experience

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions