You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to convert "all_techniques" to JSON file by "json.dump" function.howerver, it reports errors "TypeError: Object of type AttackPattern is not JSON serializable"
That is not an issue with the library. The output of those functions is correct. With get_techniques() and other functions that returns objects from ATT&CK TAXII, they are STIX objects. Therefore, you cannot simply use json.dumps() against the list.
You first have to serialize each STIX object in the list that you get back, then use json.loads to convert each object to a dictionary and then take the list of dictionaries and then run json.dumos(). Finally, you can export that to a JSON file.
I want to convert "all_techniques" to JSON file by "json.dump" function.howerver, it reports errors "TypeError: Object of type AttackPattern is not JSON serializable"
lift = attack_client() all_techniques = lift.get_techniques() all_techniques = lift.remove_revoked(all_techniques)
The text was updated successfully, but these errors were encountered: