{"action":"opened","issue":{"url":"https://api.github.com/repos/aaubry/YamlDotNet/issues/322","repository_url":"https://api.github.com/repos/aaubry/YamlDotNet","labels_url":"https://api.github.com/repos/aaubry/YamlDotNet/issues/322/labels{/name}","comments_url":"https://api.github.com/repos/aaubry/YamlDotNet/issues/322/comments","events_url":"https://api.github.com/repos/aaubry/YamlDotNet/issues/322/events","html_url":"https://github.com/aaubry/YamlDotNet/issues/322","id":323605601,"number":322,"title":"Is there a way to honour JsonExtensionData on an object?","user":{"login":"pms1969","id":2762128,"avatar_url":"https://avatars2.githubusercontent.com/u/2762128?v=4","gravatar_id":"","url":"https://api.github.com/users/pms1969","html_url":"https://github.com/pms1969","followers_url":"https://api.github.com/users/pms1969/followers","following_url":"https://api.github.com/users/pms1969/following{/other_user}","gists_url":"https://api.github.com/users/pms1969/gists{/gist_id}","starred_url":"https://api.github.com/users/pms1969/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pms1969/subscriptions","organizations_url":"https://api.github.com/users/pms1969/orgs","repos_url":"https://api.github.com/users/pms1969/repos","events_url":"https://api.github.com/users/pms1969/events{/privacy}","received_events_url":"https://api.github.com/users/pms1969/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-16T12:48:22Z","updated_at":"2018-05-16T12:48:22Z","closed_at":null,"author_association":"NONE","body":"I'm trying to use YamlDotNet to serialise a swaggerDoc (provided by swashbuckle) object into yaml.\r\n\r\nthe Json is serialised correctly with the vendor extensions being rendered at the parameter level.  However, when serialising as yaml, the extensions are output as an array of \"extensions\".  Looking at the swaggerDoc definition for Operation, the Extensions property is annotated with `[JsonExtensionData]`, which tells the json serialiser to treat the dictionary as if it were a set of properties.  I've basically lifted the code from [this stackoverflow post](https://stackoverflow.com/a/49695626/186184)\r\n\r\nThe output I get is:\r\n```yaml\r\n    get:\r\n      tags:\r\n      - Thing\r\n      summary: Gets a thing\r\n      consumes: []\r\n      produces:\r\n      - text/plain\r\n      - application/json\r\n      - text/json\r\n      parameters: {}\r\n      responses:\r\n        200:\r\n          description: Thing\r\n          schema:\r\n            type: array\r\n            items:\r\n              $ref: '#/definitions/Thingy'\r\n      extensions:\r\n        x-vendor-extension:\r\n          type: http\r\n          http-method: GET\r\n          uri: https://localhost/\r\n          request-parameters:\r\n            integration.request.header.x-custom-header: \"a value'\"\r\n```\r\n\r\nAnd what I want to output is:\r\n```yaml\r\n    get:\r\n      tags:\r\n      - Thing\r\n      summary: Gets a thing\r\n      consumes: []\r\n      produces:\r\n      - text/plain\r\n      - application/json\r\n      - text/json\r\n      parameters: {}\r\n      responses:\r\n        200:\r\n          description: Thing\r\n          schema:\r\n            type: array\r\n            items:\r\n              $ref: '#/definitions/Thingy'\r\n      x-vendor-extension:\r\n        type: http\r\n        http-method: GET\r\n        uri: https://localhost/\r\n        request-parameters:\r\n          integration.request.header.x-custom-header: \"a value'\"\r\n```\r\n\r\nAny help would be greatly appreciated."}}
{"actor":{"display_login":"pms1969"}}