JSON与XML动态转换研究及应用  被引量:18

Research and Application of JSON and XML Dynamic Transformation

在线阅读下载全文

作  者:刘立 赵建军[1] 张锦鹏 余进 LIU Li;ZHAO Jian-jun;ZHANG Jin-peng;YU Jin(College of Science,Kunming University of Science and Technology,Kunming 650500,China)

机构地区:[1]昆明理工大学理学院,云南昆明650500

出  处:《软件导刊》2018年第11期162-166,共5页Software Guide

基  金:国家自然科学基金青年科学基金项目(11103069)

摘  要:感知层获取的以JSON格式存放于服务器的数据需要实时展现到Web前端。针对该需求,提出一种将JSON文件实时转换为XML文件以满足Web端解析的方法,对JSON字符串序列化,删除冗余MAP键值对,并对JSON文件进行自定义转换内容,通过单线程最终实现JSON到XML文件的转换。转换结果显示,使用上述方法打包生成的jar包能有效读取JSON文件,并能转换成XML文件存储,从而对感知层获取的数据实现了有效利用。The data stored in the server in the JSON format acquired by the sensing layer needs to be displayed to the Web front end in real time.Aiming at this requirement,this paper proposes a method of converting JSON files into XML files in real time to realise the WEB-side parsing,serialise JSON strings,delete redundant MAP key-value pairs,and custom-convert JSON files.The conversion of JSON to XML files is ultimatelyimplemented by single threading.The conversion result shows that the jar package generated by using the above method can effectively read the JSON files and convert them into XML files for storage.Thereby,the effective utilization of the data acquired by the sensing layer is realized.

关 键 词:JSON XML 动态转换 数据交换 

分 类 号:TP319[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象