{"action":"opened","issue":{"url":"https://api.github.com/repos/tebeka/fastavro/issues/17","labels_url":"https://api.github.com/repos/tebeka/fastavro/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/tebeka/fastavro/issues/17/comments","events_url":"https://api.github.com/repos/tebeka/fastavro/issues/17/events","html_url":"https://github.com/tebeka/fastavro/issues/17","id":100710602,"number":17,"title":"Writing and reading sets boolean to False","user":{"login":"DoHe","id":11160629,"avatar_url":"https://avatars.githubusercontent.com/u/11160629?v=3","gravatar_id":"","url":"https://api.github.com/users/DoHe","html_url":"https://github.com/DoHe","followers_url":"https://api.github.com/users/DoHe/followers","following_url":"https://api.github.com/users/DoHe/following{/other_user}","gists_url":"https://api.github.com/users/DoHe/gists{/gist_id}","starred_url":"https://api.github.com/users/DoHe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoHe/subscriptions","organizations_url":"https://api.github.com/users/DoHe/orgs","repos_url":"https://api.github.com/users/DoHe/repos","events_url":"https://api.github.com/users/DoHe/events{/privacy}","received_events_url":"https://api.github.com/users/DoHe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-13T08:00:43Z","updated_at":"2015-08-13T08:00:43Z","closed_at":null,"body":"I use following schema:\r\n\r\n```\r\n{'fields': [{'name': 'flag', 'type': 'boolean'}],\r\n 'name': 'test',\r\n 'type': 'record'}\r\n```\r\n\r\nto write this datum:\r\n\r\n```\r\n{\"flag\":True}\r\n```\r\n\r\nSerializing results in this byte string:\r\n\r\n```\r\nb'Obj\\x01\\x04\\x14avro.codec\\x08null\\x16avro.schema\\xa6\\x01{\"name\": \"test\", \"type\": \"record\", \"fields\": [{\"type\": \"boolean\", \"name\": \"flag\"}]}\\x00:\\xea\\xf7\\x8cV\\xa0:4\\\\\\xd0A\\x85\\xa4\\x05\\xcf\\xe9\\x02\\x021:\\xea\\xf7\\x8cV\\xa0:4\\\\\\xd0A\\x85\\xa4\\x05\\xcf\\xe9'\r\n```\r\n\r\nand deserializing it gives me this datum:\r\n\r\n```\r\n[{'flag': False}]\r\n```\r\n\r\ni.e. the True has been turned to False. The deserialized schema is intact.\r\n\r\nAdditionally, writing a datum like `{}` works just fine (although it should throw an Exception) and when reading back, I again get:\r\n\r\n```\r\n[{'flag': False}]\r\n```\r\n\r\nI'm using python3, but have reproduced the problem on python2 as well. I also tried the pure python version without the compiled cython extensions and have the same problem there. I use a BytesIO as the fo, if this matters."}}