{"action":"created","issue":{"url":"https://api.github.com/repos/kowainik/tomland/issues/14","repository_url":"https://api.github.com/repos/kowainik/tomland","labels_url":"https://api.github.com/repos/kowainik/tomland/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/kowainik/tomland/issues/14/comments","events_url":"https://api.github.com/repos/kowainik/tomland/issues/14/events","html_url":"https://github.com/kowainik/tomland/issues/14","id":311295299,"node_id":"MDU6SXNzdWUzMTEyOTUyOTk=","number":14,"title":"Add parsing of inline tables","user":{"login":"ChShersh","id":4276606,"node_id":"MDQ6VXNlcjQyNzY2MDY=","avatar_url":"https://avatars0.githubusercontent.com/u/4276606?v=4","gravatar_id":"","url":"https://api.github.com/users/ChShersh","html_url":"https://github.com/ChShersh","followers_url":"https://api.github.com/users/ChShersh/followers","following_url":"https://api.github.com/users/ChShersh/following{/other_user}","gists_url":"https://api.github.com/users/ChShersh/gists{/gist_id}","starred_url":"https://api.github.com/users/ChShersh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChShersh/subscriptions","organizations_url":"https://api.github.com/users/ChShersh/orgs","repos_url":"https://api.github.com/users/ChShersh/repos","events_url":"https://api.github.com/users/ChShersh/events{/privacy}","received_events_url":"https://api.github.com/users/ChShersh/received_events","type":"User","site_admin":false},"labels":[{"id":1074239493,"node_id":"MDU6TGFiZWwxMDc0MjM5NDkz","url":"https://api.github.com/repos/kowainik/tomland/labels/Hacktoberfest","name":"Hacktoberfest","color":"FBA36B","default":false},{"id":868800813,"node_id":"MDU6TGFiZWw4Njg4MDA4MTM=","url":"https://api.github.com/repos/kowainik/tomland/labels/help%20wanted","name":"help wanted","color":"008672","default":true},{"id":870366211,"node_id":"MDU6TGFiZWw4NzAzNjYyMTE=","url":"https://api.github.com/repos/kowainik/tomland/labels/parser","name":"parser","color":"7ff997","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/kowainik/tomland/milestones/2","html_url":"https://github.com/kowainik/tomland/milestone/2","labels_url":"https://api.github.com/repos/kowainik/tomland/milestones/2/labels","id":3363842,"node_id":"MDk6TWlsZXN0b25lMzM2Mzg0Mg==","number":2,"title":"v1.0.0: Public release","description":"Make it usable, support almost whole TOML specification, test, write docs and tutorials","creator":{"login":"ChShersh","id":4276606,"node_id":"MDQ6VXNlcjQyNzY2MDY=","avatar_url":"https://avatars0.githubusercontent.com/u/4276606?v=4","gravatar_id":"","url":"https://api.github.com/users/ChShersh","html_url":"https://github.com/ChShersh","followers_url":"https://api.github.com/users/ChShersh/followers","following_url":"https://api.github.com/users/ChShersh/following{/other_user}","gists_url":"https://api.github.com/users/ChShersh/gists{/gist_id}","starred_url":"https://api.github.com/users/ChShersh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChShersh/subscriptions","organizations_url":"https://api.github.com/users/ChShersh/orgs","repos_url":"https://api.github.com/users/ChShersh/repos","events_url":"https://api.github.com/users/ChShersh/events{/privacy}","received_events_url":"https://api.github.com/users/ChShersh/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":54,"state":"open","created_at":"2018-05-22T08:23:04Z","updated_at":"2018-10-26T08:06:58Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2018-04-04T16:08:29Z","updated_at":"2018-10-26T08:32:17Z","closed_at":null,"author_association":"MEMBER","body":"This might be convenient with #13."},"comment":{"url":"https://api.github.com/repos/kowainik/tomland/issues/comments/433331157","html_url":"https://github.com/kowainik/tomland/issues/14#issuecomment-433331157","issue_url":"https://api.github.com/repos/kowainik/tomland/issues/14","id":433331157,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzMzMTE1Nw==","user":{"login":"ChShersh","id":4276606,"node_id":"MDQ6VXNlcjQyNzY2MDY=","avatar_url":"https://avatars0.githubusercontent.com/u/4276606?v=4","gravatar_id":"","url":"https://api.github.com/users/ChShersh","html_url":"https://github.com/ChShersh","followers_url":"https://api.github.com/users/ChShersh/followers","following_url":"https://api.github.com/users/ChShersh/following{/other_user}","gists_url":"https://api.github.com/users/ChShersh/gists{/gist_id}","starred_url":"https://api.github.com/users/ChShersh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChShersh/subscriptions","organizations_url":"https://api.github.com/users/ChShersh/orgs","repos_url":"https://api.github.com/users/ChShersh/repos","events_url":"https://api.github.com/users/ChShersh/events{/privacy}","received_events_url":"https://api.github.com/users/ChShersh/received_events","type":"User","site_admin":false},"created_at":"2018-10-26T08:32:17Z","updated_at":"2018-10-26T08:32:17Z","author_association":"MEMBER","body":"@jiegillet \r\n\r\n> should, to my understanding, be parsed to the same tree\r\n\r\nI don't think this should be parsed to the same tree. Maybe only if you parse and then convert to JSON these configurations can have the same structure. But with TOML you can visually separate keys on tables and key-value pairs. There're two reasons to store keys and tables separately — optimisations and simplicity.\r\n\r\nYou can see more uniform way to represent TOML in this library:\r\n\r\n* https://hackage.haskell.org/package/toml-parser-0.1.0.0/docs/TOML.html#v:parseTOML\r\n\r\nBut the goal of `tomland` is not to be able to parse structurally equivalent configurations, it's more about more clear specification of configuration format and adding restrictions. Also, it brings a lot of complexity to the code if you want to be able to specify path for key like `dog.type.name` and be able to parse different TOML configurations. Probably somebody can do this in different library 🙂 \r\n\r\nRegarding parsing things like this one:\r\n\r\n```haskell\r\nx = 1\r\ntable = { hello = \"world\"}\r\ny = 2\r\n```\r\n\r\nI think that solution can be to replace the type of `keyValP` from the current one:\r\n\r\nhttps://github.com/kowainik/tomland/blob/713f23258ca2f1d1a31bc6d360269aad06ce0608/src/Toml/Parser/TOML.hs#L17\r\n\r\nTo something like:\r\n\r\n```haskell\r\nkeyValP :: Parser (Key, Either TOML AnyValue)\r\n```\r\n\r\nAnd then you can convert `[(Key, TOML)]` and `[(Key, Either TOML AnyValue)]` to `TOML`."}}
{"actor":{"display_login":"ChShersh"}}