Closed
Description
Can I override what newline character(s) the library is generating as it is creating YAML? I have the following code.
// Converting to JSON object.
var expConverter = new ExpandoObjectConverter();
dynamic deserializedObject = JsonConvert.DeserializeObject<ExpandoObject>(someJsonStringHere, expConverter);
// Converting to YAML.
var serializer = new SerializerBuilder().Build();
var yaml = serializer.Serialize(deserializedObject);
I want the library to always output CR/LF
, regardless of what operating system I am on. Is this possible?
Activity
EdwardCooke commentedon Nov 28, 2022
Right now, no. It shouldn’t be hard to implement though. We’re always willing to accept pull requests with bug fixes and additional features. If I get time I can also work on it.
Fix for aaubry#746
polterguy commentedon Nov 29, 2022
Let me know if it's acceptable. When you create a release with this, do you mind just commenting here to let me know? I kind of need this feature in our own stuff ...
I made sure it's using
Environment.NewLine
by default, and all tests are passing ...EdwardCooke commentedon Nov 30, 2022
I’ll take a look at it later today or tonight.
polterguy commentedon Nov 30, 2022
Thx
EdwardCooke commentedon Dec 1, 2022
Got the build started again, just a 403 error to work though. I think the token is expired for talking to github, which I can't fix. @aaubry will need to do that.
aaubry commentedon Dec 1, 2022
I'll have a look later.
EdwardCooke commentedon Dec 8, 2022
I'm going to close this since the PR is released.