{"action":"opened","issue":{"url":"https://api.github.com/repos/an2deg/pyraml-parser/issues/22","labels_url":"https://api.github.com/repos/an2deg/pyraml-parser/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/an2deg/pyraml-parser/issues/22/comments","events_url":"https://api.github.com/repos/an2deg/pyraml-parser/issues/22/events","html_url":"https://github.com/an2deg/pyraml-parser/issues/22","id":94881554,"number":22,"title":"Can't export to new RAML/YAML files","user":{"login":"ex-nerd","id":154074,"avatar_url":"https://avatars.githubusercontent.com/u/154074?v=3","gravatar_id":"","url":"https://api.github.com/users/ex-nerd","html_url":"https://github.com/ex-nerd","followers_url":"https://api.github.com/users/ex-nerd/followers","following_url":"https://api.github.com/users/ex-nerd/following{/other_user}","gists_url":"https://api.github.com/users/ex-nerd/gists{/gist_id}","starred_url":"https://api.github.com/users/ex-nerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ex-nerd/subscriptions","organizations_url":"https://api.github.com/users/ex-nerd/orgs","repos_url":"https://api.github.com/users/ex-nerd/repos","events_url":"https://api.github.com/users/ex-nerd/events{/privacy}","received_events_url":"https://api.github.com/users/ex-nerd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-14T07:02:40Z","updated_at":"2015-07-14T07:02:40Z","closed_at":null,"body":"I tried to use this today to flatten out some RAML files (so I could import them into postman) and discovered that the pyraml models don't re-encode cleanly.  Using a simple script like this one:\r\n\r\n```python\r\nimport pyraml.parser\r\nimport yaml\r\np = pyraml.parser.load('main.raml')\r\nprint yaml.dump(p)\r\n```\r\n\r\n... elements encode using a variety of non-generic types like:\r\n\r\n* `!!python/object:pyraml.entities.RamlTrait`\r\n* `!!python/object:pyraml.entities.RamlResource`\r\n* `!!python/object:pyraml.entities.RamlMethod`\r\n* `!!python/unicode` (for embedded JSON schemas)\r\n\r\nAnd so forth.\r\n\r\nI haven't yet tested this but it looks like fixing some of these might be as easy as extending `BaseModel` from `yaml.YAMLObject` instead of plain `object`.\r\n\r\nIs this something you'd be open to having fixed (even if it means creating a `pyraml.parser.dump(p)` type method)?  If so, I can keep poking at it."}}