Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Cake YAML Support for YAML Merge #1

Merged
merged 2 commits into from
May 4, 2017

Conversation

DaveDiehl
Copy link
Contributor

I needed the ability to parse a YAML file with a merge key. The YAML DotNet framework supports it (see this StackOverflow article), but the parser used before will not support it.

To do this, you need to use the MergingParser in place of the StringReader.

 using (var tr = new StringReader(yaml))
        {
            var reader = new EventReader(new MergingParser(new Parser(tr)));
            result = d.Deserialize<T>(reader);
        }

I added tests to make sure this functionality works and is backward compatible.

@critesjm
Copy link

critesjm commented May 4, 2017

Hey @Redth, would you mind giving this a peek?

@Redth
Copy link
Contributor

Redth commented May 4, 2017

lgtm! 🚢

@Redth Redth merged commit 04d2479 into cake-contrib:master May 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants