Skip to content

Commit

Permalink
Fixes Object of type WhistleBlowerDict is not JSON serializable (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
anatliVT authored Feb 7, 2024
1 parent 011039a commit 4be9a7c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/create_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

import argparse
import io
import json
import vt
from pprint import pprint


def create_collection(client, name, description, file):
Expand Down Expand Up @@ -66,7 +66,7 @@ def main():
collection_obj = create_collection(client, args.name, args.description, iocs)

client.close()
print(json.dumps(collection_obj.to_dict(), indent=2))
pprint(collection_obj.to_dict())

print(f"Link:\n{generate_ui_link(collection_obj.id)}")

Expand Down
4 changes: 2 additions & 2 deletions examples/create_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import argparse
import base64
import json
from pprint import pprint
import vt


Expand Down Expand Up @@ -170,7 +170,7 @@ def main():

client.close()
if reference_obj:
print(json.dumps(reference_obj.to_dict(), indent=2))
pprint(reference_obj.to_dict())


if __name__ == "__main__":
Expand Down
4 changes: 2 additions & 2 deletions examples/update_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import argparse
import io
import json
from pprint import pprint
import vt


Expand Down Expand Up @@ -62,7 +62,7 @@ def main():
collection_obj = update_collection(client, args.id, iocs)

client.close()
print(json.dumps(collection_obj.to_dict(), indent=2))
pprint(collection_obj.to_dict())

print(f"Link:\n{generate_ui_link(collection_obj.id)}")

Expand Down

0 comments on commit 4be9a7c

Please sign in to comment.