mirror of https://github.com/MISP/PyMISP
chg: Make clear that to_json returns str
parent
78ead2f49e
commit
a51f46d9af
|
@ -237,7 +237,7 @@ class AbstractMISP(MutableMapping, MISPFileCache, metaclass=ABCMeta):
|
|||
to_return = _int_to_str(to_return)
|
||||
return to_return
|
||||
|
||||
def to_json(self, sort_keys: bool = False, indent: Optional[int] = None):
|
||||
def to_json(self, sort_keys: bool = False, indent: Optional[int] = None) -> str:
|
||||
"""Dump recursively any class of type MISPAbstract to a json string"""
|
||||
return dumps(self, default=pymisp_json_default, sort_keys=sort_keys, indent=indent)
|
||||
|
||||
|
|
Loading…
Reference in New Issue