{"action":"created","issue":{"url":"https://api.github.com/repos/aaubry/YamlDotNet/issues/164","repository_url":"https://api.github.com/repos/aaubry/YamlDotNet","labels_url":"https://api.github.com/repos/aaubry/YamlDotNet/issues/164/labels{/name}","comments_url":"https://api.github.com/repos/aaubry/YamlDotNet/issues/164/comments","events_url":"https://api.github.com/repos/aaubry/YamlDotNet/issues/164/events","html_url":"https://github.com/aaubry/YamlDotNet/pull/164","id":131401180,"number":164,"title":"Modify YamlVisitor behavior","user":{"login":"nbarbettini","id":7525482,"avatar_url":"https://avatars.githubusercontent.com/u/7525482?v=3","gravatar_id":"","url":"https://api.github.com/users/nbarbettini","html_url":"https://github.com/nbarbettini","followers_url":"https://api.github.com/users/nbarbettini/followers","following_url":"https://api.github.com/users/nbarbettini/following{/other_user}","gists_url":"https://api.github.com/users/nbarbettini/gists{/gist_id}","starred_url":"https://api.github.com/users/nbarbettini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbarbettini/subscriptions","organizations_url":"https://api.github.com/users/nbarbettini/orgs","repos_url":"https://api.github.com/users/nbarbettini/repos","events_url":"https://api.github.com/users/nbarbettini/events{/privacy}","received_events_url":"https://api.github.com/users/nbarbettini/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-04T16:29:54Z","updated_at":"2016-02-04T18:22:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aaubry/YamlDotNet/pulls/164","html_url":"https://github.com/aaubry/YamlDotNet/pull/164","diff_url":"https://github.com/aaubry/YamlDotNet/pull/164.diff","patch_url":"https://github.com/aaubry/YamlDotNet/pull/164.patch"},"body":"I made a change to YamlVisitor to make it behave more like the ExpressionVisitor class: by overriding the `Visit` methods, a subclass can change the visitor's behavior. (For example, choosing not to visit a particular mapping.)\r\n\r\nI also broke out visiting the key and value of a mapping into the `VisitPair` method to make it easier to observe this behavior.\r\n\r\nThese changes were super helpful when I was writing a custom YAML configuration parser in my project. (The result is [here](https://github.com/stormpath/stormpath-dotnet-config/blob/6c8ce545bdcac11f8138611557e2d36628917321/Microsoft.Extensions.Configuration.Contrib.Stormpath.Yaml/Visitor/ContextAwareVisitor.cs).) If you don't want to introduce these changes into your code, no worries - thought I'd share in case it was helpful to someone else. :smile: "},"comment":{"url":"https://api.github.com/repos/aaubry/YamlDotNet/issues/comments/179980215","html_url":"https://github.com/aaubry/YamlDotNet/pull/164#issuecomment-179980215","issue_url":"https://api.github.com/repos/aaubry/YamlDotNet/issues/164","id":179980215,"user":{"login":"aaubry","id":630495,"avatar_url":"https://avatars.githubusercontent.com/u/630495?v=3","gravatar_id":"","url":"https://api.github.com/users/aaubry","html_url":"https://github.com/aaubry","followers_url":"https://api.github.com/users/aaubry/followers","following_url":"https://api.github.com/users/aaubry/following{/other_user}","gists_url":"https://api.github.com/users/aaubry/gists{/gist_id}","starred_url":"https://api.github.com/users/aaubry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaubry/subscriptions","organizations_url":"https://api.github.com/users/aaubry/orgs","repos_url":"https://api.github.com/users/aaubry/repos","events_url":"https://api.github.com/users/aaubry/events{/privacy}","received_events_url":"https://api.github.com/users/aaubry/received_events","type":"User","site_admin":false},"created_at":"2016-02-04T18:22:43Z","updated_at":"2016-02-04T18:22:43Z","body":"This looks good. The only problem is that it is a breaking change. Maybe we should introduce this as a new class, and mark the old one as `[Obsolete]`, so we don't break existing implementations. Does this make sense?"}}