json.Instance

An json.Instance object represents a JSON instance document.

class json.Instance

Proper instances of this class will be created within RaptorXML only, instantiation from script code will throw a NotImplementedError exception.

Class methods

classmethod json.Instance.convert_json_to_xml_from_buffer(type cls, buf, *, catalog=None, **kargs)

Converts the buffer buf containing a JSON document to an XML document. Returns a tuple with a string containing the XML content and an xml.ErrorLog object. Optional user XML catalogs can be specified with the catalog argument. Other conversion options can be specified using additional kargs. Please consult the RaptorXML CLI documentation http://manual.altova.com/RaptorXML/raptorxmlxbrlserver/rxcli_jsonavro_json2xml.htm for a list of available options. Any errors and warnings reported during the conversion can be accessed through the returned xml.ErrorLog object.

classmethod json.Instance.convert_json_to_xml_from_url(type cls, url, *, catalog=None, **kargs)

Converts the JSON document at the given url to an XML document. Returns a tuple with a string containing the XML content and an xml.ErrorLog object. Optional user XML catalogs can be specified with the catalog argument. Other conversion options can be specified using additional kargs. Please consult the RaptorXML CLI documentation http://manual.altova.com/RaptorXML/raptorxmlxbrlserver/rxcli_jsonavro_json2xml.htm for a list of available options. Any errors and warnings reported during the conversion can be accessed through the returned xml.ErrorLog object.

classmethod json.Instance.convert_xml_to_json_from_buffer(type cls, buf, *, catalog=None, **kargs)

Converts the buffer buf containing an XML document to a JSON document. Returns a tuple with a string containing the JSON content and an xml.ErrorLog object. Optional user XML catalogs can be specified with the catalog argument. Other conversion options can be specified using additional kargs. Please consult the RaptorXML CLI documentation http://manual.altova.com/RaptorXML/raptorxmlxbrlserver/rxcli_jsonavro_xml2json.htm for a list of available options. Any errors and warnings reported during the conversion can be accessed through the returned xml.ErrorLog object.

classmethod json.Instance.convert_xml_to_json_from_url(type cls, url, *, catalog=None, **kargs)

Converts the XML document at the given url to a JSON document. Returns a tuple with a string containing the JSON content and an xml.ErrorLog object. Optional user XML catalogs can be specified with the catalog argument. Other conversion options can be specified using additional kargs. Please consult the RaptorXML CLI documentation http://manual.altova.com/RaptorXML/raptorxmlxbrlserver/rxcli_jsonavro_xml2json.htm for a list of available options. Any errors and warnings reported during the conversion can be accessed through the returned xml.ErrorLog object.

classmethod json.Instance.is_wellformed_buffer(type cls, buf, *, catalog=None, **kargs)

Checks the buffer buf containing a JSON document according to the ECMA-404 specification for wellformedness and returns an xml.ErrorLog object with the results. Optional user XML catalogs can be specified with the catalog argument. Other validation options can be specified using additional kargs. Please consult the RaptorXML CLI documentation http://manual.altova.com/RaptorXML/raptorxmlxbrlserver/rxcli_jsonavro_wfjson.htm for a list of available options. Any errors and warnings reported during the validation can be accessed through the returned xml.ErrorLog object.

classmethod json.Instance.is_wellformed_url(type cls, url, *, catalog=None, **kargs)

Checks the JSON document at the given url according to the ECMA-404 specification for wellformedness and returns an xml.ErrorLog object with the results. Optional user XML catalogs can be specified with the catalog argument. Other validation options can be specified using additional kargs. Please consult the RaptorXML CLI documentation http://manual.altova.com/RaptorXML/raptorxmlxbrlserver/rxcli_jsonavro_wfjson.htm for a list of available options. Any errors and warnings reported during the validation can be accessed through the returned xml.ErrorLog object.

classmethod json.Instance.validate_buffer(type cls, buf, *, Schema schema, catalog=None, **kargs)

Validates the buffer buf containing a JSON document against the specified JSON schema according to the JSON schema draft 4 and returns xml.ErrorLog object with the results. Optional user XML catalogs can be specified with the catalog argument. Other validation options can be specified using additional kargs. Please consult the RaptorXML CLI documentation http://manual.altova.com/RaptorXML/raptorxmlxbrlserver/rxcli_jsonavro_valjson.htm for a list of available options. Any errors and warnings reported during the validation can be accessed through the returned xml.ErrorLog object.

classmethod json.Instance.validate_url(type cls, url, *, Schema schema, catalog=None, **kargs)

Validates the JSON document at the given url against the specified JSON schema according to the JSON schema draft 4 and returns xml.ErrorLog object with the results. Optional user XML catalogs can be specified with the catalog argument. Other validation options can be specified using additional kargs. Please consult the RaptorXML CLI documentation http://manual.altova.com/RaptorXML/raptorxmlxbrlserver/rxcli_jsonavro_valjson.htm for a list of available options. Any errors and warnings reported during the validation can be accessed through the returned xml.ErrorLog object.

Attributes

json.Instance.uri

Returns the URI of the document (after any catalog mappings) that was used to actually open the document and read its content.

Special methods

__bool__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__