{"action":"created","issue":{"url":"https://api.github.com/repos/oasis-open/cti-python-stix2/issues/125","repository_url":"https://api.github.com/repos/oasis-open/cti-python-stix2","labels_url":"https://api.github.com/repos/oasis-open/cti-python-stix2/issues/125/labels{/name}","comments_url":"https://api.github.com/repos/oasis-open/cti-python-stix2/issues/125/comments","events_url":"https://api.github.com/repos/oasis-open/cti-python-stix2/issues/125/events","html_url":"https://github.com/oasis-open/cti-python-stix2/issues/125","id":293753354,"number":125,"title":"TypeError: Object of type ThreatActor is not JSON serializable","user":{"login":"m0jtaba","id":5896871,"avatar_url":"https://avatars2.githubusercontent.com/u/5896871?v=4","gravatar_id":"","url":"https://api.github.com/users/m0jtaba","html_url":"https://github.com/m0jtaba","followers_url":"https://api.github.com/users/m0jtaba/followers","following_url":"https://api.github.com/users/m0jtaba/following{/other_user}","gists_url":"https://api.github.com/users/m0jtaba/gists{/gist_id}","starred_url":"https://api.github.com/users/m0jtaba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m0jtaba/subscriptions","organizations_url":"https://api.github.com/users/m0jtaba/orgs","repos_url":"https://api.github.com/users/m0jtaba/repos","events_url":"https://api.github.com/users/m0jtaba/events{/privacy}","received_events_url":"https://api.github.com/users/m0jtaba/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-02-02T02:32:44Z","updated_at":"2018-02-05T16:13:27Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Have I missed something fundamental here, trying to push stix content but getting \"TypeError: Object of type ThreatActor is not JSON serializable\"\r\n\r\n```\r\nfrom stix2 import TAXIICollectionSink, ThreatActor\r\nfrom taxii2client import Collection\r\nimport json\r\ncollection = Collection(\"http://127.0.0.1:5000/trustgroup1/collections/91a7b528-80eb-42ed-a74d-c6fbd5a26116/\", user=\"admin\", password=\"Password0\")\r\n\r\n#create TAXIICollectionSINK and push STIX content to it\r\ntc_sink = TAXIICollectionSink(collection)\r\n\r\n# create new STIX threat-actor\r\nta = ThreatActor(name=\"Teddy Bear\",\r\n                labels=[\"nation-state\"],\r\n                sophistication=\"innovator\",\r\n                resource_level=\"government\",\r\n                goals=[\r\n                    \"compromising environment NGOs\",\r\n                    \"water-hole attacks geared towards energy sector\",\r\n                ])\r\n\r\ntc_sink.add(ta)"},"comment":{"url":"https://api.github.com/repos/oasis-open/cti-python-stix2/issues/comments/363133314","html_url":"https://github.com/oasis-open/cti-python-stix2/issues/125#issuecomment-363133314","issue_url":"https://api.github.com/repos/oasis-open/cti-python-stix2/issues/125","id":363133314,"user":{"login":"m0jtaba","id":5896871,"avatar_url":"https://avatars2.githubusercontent.com/u/5896871?v=4","gravatar_id":"","url":"https://api.github.com/users/m0jtaba","html_url":"https://github.com/m0jtaba","followers_url":"https://api.github.com/users/m0jtaba/followers","following_url":"https://api.github.com/users/m0jtaba/following{/other_user}","gists_url":"https://api.github.com/users/m0jtaba/gists{/gist_id}","starred_url":"https://api.github.com/users/m0jtaba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m0jtaba/subscriptions","organizations_url":"https://api.github.com/users/m0jtaba/orgs","repos_url":"https://api.github.com/users/m0jtaba/repos","events_url":"https://api.github.com/users/m0jtaba/events{/privacy}","received_events_url":"https://api.github.com/users/m0jtaba/received_events","type":"User","site_admin":false},"created_at":"2018-02-05T16:13:27Z","updated_at":"2018-02-05T16:13:27Z","author_association":"CONTRIBUTOR","body":"@gtback  So removing the TAXIICollectionSink in python-stix2 from my example above, how would you just use the TAXII client to post an object?  if possible, can you please provide an example?"}}
{"actor":{"display_login":"m0jtaba"}}