update docstrings for _STIXBase method

pull/1/head
Emmanuelle Vargas-Gonzalez 2020-07-22 15:20:39 -04:00
parent 978aee9a8e
commit ca56a74e12
1 changed files with 2 additions and 16 deletions

View File

@ -237,14 +237,6 @@ class _STIXBase(Mapping):
""" """
Serialize a STIX object. Serialize a STIX object.
Args:
pretty (bool): If True, output properties following the STIX specs
formatting. This includes indentation. Refer to notes for more
details. (Default: ``False``)
include_optional_defaults (bool): Determines whether to include
optional properties set to the default value defined in the spec.
**kwargs: The arguments for a json.dumps() call.
Examples: Examples:
>>> import stix2 >>> import stix2
>>> identity = stix2.Identity(name='Example Corp.', identity_class='organization') >>> identity = stix2.Identity(name='Example Corp.', identity_class='organization')
@ -263,14 +255,8 @@ class _STIXBase(Mapping):
Returns: Returns:
str: The serialized JSON object. str: The serialized JSON object.
Note: See Also:
The argument ``pretty=True`` will output the STIX object following ``stix2.serialization.serialize`` for options.
spec order. Using this argument greatly impacts object serialization
performance. If your use case is centered across machine-to-machine
operation it is recommended to set ``pretty=False``.
When ``pretty=True`` the following key-value pairs will be added or
overridden: indent=4, separators=(",", ": "), item_sort_key=sort_by.
""" """
return serialize(self, *args, **kwargs) return serialize(self, *args, **kwargs)