{"action":"opened","issue":{"url":"https://api.github.com/repos/construct/construct/issues/274","repository_url":"https://api.github.com/repos/construct/construct","labels_url":"https://api.github.com/repos/construct/construct/issues/274/labels{/name}","comments_url":"https://api.github.com/repos/construct/construct/issues/274/comments","events_url":"https://api.github.com/repos/construct/construct/issues/274/events","html_url":"https://github.com/construct/construct/issues/274","id":188839583,"number":274,"title":"computed Struct name","user":{"login":"Gheoan","id":9906612,"avatar_url":"https://avatars.githubusercontent.com/u/9906612?v=3","gravatar_id":"","url":"https://api.github.com/users/Gheoan","html_url":"https://github.com/Gheoan","followers_url":"https://api.github.com/users/Gheoan/followers","following_url":"https://api.github.com/users/Gheoan/following{/other_user}","gists_url":"https://api.github.com/users/Gheoan/gists{/gist_id}","starred_url":"https://api.github.com/users/Gheoan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gheoan/subscriptions","organizations_url":"https://api.github.com/users/Gheoan/orgs","repos_url":"https://api.github.com/users/Gheoan/repos","events_url":"https://api.github.com/users/Gheoan/events{/privacy}","received_events_url":"https://api.github.com/users/Gheoan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-11T20:05:56Z","updated_at":"2016-11-11T20:05:56Z","closed_at":null,"body":"I have the following bytes:\r\n```python\r\nb'\\x0A\\x00\\x00\\x05\\x54\\x6F\\x74\\x61\\x6C'\r\n```\r\nwhich I parse with:\r\n```python\r\nStruct(None, ULInt16('count'), ULInt8('id'), PascalString('name'))\r\n```\r\nwhich outputs:\r\n```python\r\nContainer({'count': 10, 'id': 0, 'name': b'Total'})\r\n```\r\nHowever, what I would like to get is:\r\n```python\r\nContainer({'count': 10, '0': {'name': b'Total'})\r\n```\r\nHow can I model my `Struct` to get the desired `Container`? If it is not possible I could manipulate the `Container` directly. Feel free to give answers in either version 2.5 or 2.8.\r\n"}}
{"actor":{"display_login":"Gheoan"}}