发明名称 Converting XML to JSON with configurable output
摘要 A device is configured to receive information that identifies an XML data structure, an input key including information that identifies an element in the XML data structure, and an output key including information that identifies a manner in which the element is to be identified in a JSON data structure. The device is configured to parse the XML data structure to determine an element identified by the input key, and generate the JSON data structure by storing an association between the element and the output key in the JSON data structure. The device is configured to populate the JSON data structure with content from the XML data structure, where the content is identified by the input key and is placed in a location in the JSON data structure identified by the output key. The device is configured to store the JSON data structure.
申请公布号 US9639631(B2) 申请公布日期 2017.05.02
申请号 US201313779052 申请日期 2013.02.27
申请人 Cellco Partnership 发明人 Williamson Victor L.
分类号 G06F7/00;G06F17/00;G06F17/30;G06F17/22;G06F17/27 主分类号 G06F7/00
代理机构 代理人
主权项 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.
地址 Basking Ridge NJ US