【发布时间】:2015-09-28 13:05:31
【问题描述】:
我是 Java 新手,我想编写一个代码,将传入的 json 文件转换为键值对中的文本,该键值对将通过管道分隔。 json 文件中的架构往往会发生变化。所以我不能根据每个值编写程序(我之前尝试过)。
有人可以帮忙吗?
文件是:
[{"type_id":4102,"id":0,"product_name":"ATP:Endpoint","feature_name":"ATP:Endpoint",
"feature_ver":"2014.2.0","atpProtocol":"av","device_uid":"D00A9450ABD85ACD2B0125968FEABBF9","device_ip":"10.75.81.205","device_name":"10.75.81.205","file":{"name":"CSIDL_PROFILE\\desktop\\av ping\\malheur_34_0\\malheur_34_0 - copy (4)","folder":"CSIDL_PROFILE\\desktop\\aving\\malheur_34_0","sha2":"BC44F53958886E6B220CA6C634D78703220139
E968719A7459B859954CAA4A77","md5":null,"version":null,"size":null,"date_created":null,"date_modified":null,"date_accessed":null},"platform":{"processor":"x86 Family 6 Model 45 Stepping 7","country":"1","language":"English","system":"Windows 7 build 7601 Service Pack 1","scanner":"Symantec Endpoint Protection 12.1.3.0"},"scan":{"signatures_version":"20141112.002","technology":"AV Engine"}]
【问题讨论】:
-
你能显示你的 json 输入吗?
-
您的预期输出是什么?您将使用什么符号表示数组、对象等。