主权项 |
1. A device comprising:
one or more processors to:
receive information that identifies an input key, an output key, and an extensible markup language (XML) data structure,
the input key including information that identifies an element in the XML data structure,the output key including information that identifies a manner in which the element is to be identified in a JavaScript object notation (JSON) data structure, andthe element being arranged in a first hierarchical structure in the XML data structure;parse the XML data structure to determine the element identified by the input key;store the element, identified by the input key, in an intermediate map based on parsing the XML data structure,
the intermediate map including a type associated with the element;store, in the intermediate map, an association between the element, identified by the input key, and the output key;selectively generate the JSON data structure, using the intermediate map, based on determining whether content from the XML data structure is of an element type identified in the intermediate map,
the JSON data structure being populated with the content based on determining that the content is of the element type identified in the intermediate map,
the content being identified by the input key and being placed in a location in the JSON data structure identified by the output key, andthe content being included in a second hierarchical structure in the JSON data structure, the first hierarchical structure being different than the second hierarchical structure,the JSON data structure not being populated with the content based on determining that the content is not of the element type identified in the intermediate map, anda non-extractive parser being used when the JSON data structure is generated without using the intermediate map; andstore the JSON data structure. |