Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using dict() on a stix2 object will not correctly serialize datetime properties #2

Closed
Cyb3rWard0g opened this issue May 31, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@Cyb3rWard0g
Copy link
Collaborator

Cyb3rWard0g commented May 31, 2018

This is apparently is a bug in Pandas and not in STIX2 according to this mitre/cti#17 . The suggestion is to apply a workaround:

Don't put them in dictionaries and instead serialize them and load the strings back to have a JSON object that you can pass to the pandas
@Cyb3rWard0g
Copy link
Collaborator Author

The script works well with Pandas 0.22.0. I will test the workaround in the next couple of days and see if it allows me to use pandas 0.23.0

@Cyb3rWard0g Cyb3rWard0g added the bug Something isn't working label May 31, 2018
@emmanvg
Copy link

emmanvg commented Jun 8, 2018

Hi @Cyb3rWard0g, you should read oasis-open/cti-python-stix2#183. You should not use dict() to serialize a stix2 object and instead use a different approach. Initially I thought that was a bug, but the behavior of dict() is simply different.

@Cyb3rWard0g
Copy link
Collaborator Author

Thank you very much @emmanvg . I got the details on the other issue. I appreciate all the details and help 👍

Cyb3rWard0g pushed a commit that referenced this issue Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants