日期:2014-05-18  浏览次数:20821 次

如何获取json数据的未知key的名称
{"files": {"Chrysanthemum.jpg": "Chrysanthemum.jpg", "index.html": "index.html", "1234.rmvb": "1234.rmvb", "apache_pb22_ani.gif": "apache_pb22_ani.gif", "123.mp4": "123.mp4", "sample_h264_1mbit.mp4": "sample_h264_1mbit.mp4", "1234.mp4": "1234.mp4", "apache_pb22.gif": "apache_pb22.gif", "test.doc": "test.doc", "apache_pb.gif": "apache_pb.gif", "testppt.pptx": "testppt.pptx", "love.mp3": "love.mp3", "apache_pb.png": "apache_pb.png", "sample_100kbit.mov": "sample_100kbit.mov", "apache_pb22.png": "apache_pb22.png", "receivetest.log": "receivetest.log", "111.docx": "111.docx", "test.txt": "test.txt"}, "dirs": {"receive": "receive", "test file": "test file"}}
假设这段数据,获取其中的files,不是value,是key

------解决方案--------------------
那得自己写解析的方法,:号前面的为Key,全部保存下来