Updated stix2.parse()-related docstrings. Its description of how
the "version" parameter was used, was out of date.stix2.1
parent
486c588306
commit
240a75861e
|
@ -17,8 +17,10 @@ def parse(data, allow_custom=False, version=None):
|
||||||
allow_custom (bool): Whether to allow custom properties as well unknown
|
allow_custom (bool): Whether to allow custom properties as well unknown
|
||||||
custom objects. Note that unknown custom objects cannot be parsed
|
custom objects. Note that unknown custom objects cannot be parsed
|
||||||
into STIX objects, and will be returned as is. Default: False.
|
into STIX objects, and will be returned as is. Default: False.
|
||||||
version (str): Which STIX2 version to use. (e.g. "2.0", "2.1"). If
|
version (str): Only used for bundles. If the spec_version property is
|
||||||
None, use latest version.
|
missing, it is ambiguous what spec should be used to parse the
|
||||||
|
bundle. In this case, this version parameter gives the spec
|
||||||
|
version to use.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
An instantiated Python STIX object.
|
An instantiated Python STIX object.
|
||||||
|
@ -50,9 +52,10 @@ def dict_to_stix2(stix_dict, allow_custom=False, version=None):
|
||||||
allow_custom (bool): Whether to allow custom properties as well unknown
|
allow_custom (bool): Whether to allow custom properties as well unknown
|
||||||
custom objects. Note that unknown custom objects cannot be parsed
|
custom objects. Note that unknown custom objects cannot be parsed
|
||||||
into STIX objects, and will be returned as is. Default: False.
|
into STIX objects, and will be returned as is. Default: False.
|
||||||
version: If version can't be determined from stix_dict, use this
|
version: Only used for bundles. If the spec_version property is
|
||||||
version of the STIX spec. If None, use the latest supported
|
missing, it is ambiguous what spec should be used to parse the
|
||||||
version. Default: None
|
bundle. In this case, this version parameter gives the spec
|
||||||
|
version to use.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
An instantiated Python STIX object
|
An instantiated Python STIX object
|
||||||
|
|
Loading…
Reference in New Issue