1.有json数据如下,取出部分关键字生成到excel文件中。
jSon数据如下:
{"code":"0","msg":"操作成功, UUID[7720e9e02d13457a80f7e347d24eda91]","data":"{\"result\":{\"count\":5429,\"result\":\"[{\\\"skuId\\\":2010385483,\\\"outSkuId\\\":\\\"\\\",\\\"orgCode\\\":75208,\\\"categoryId\\\":20285,\\\"brandId\\\":35247,\\\"skuName\\\":\\\"鲜羊腿肉 (带骨) 约500g/份\\\",\\\"skuPrice\\\":10000,\\\"stockNum\\\":0,\\\"weight\\\":0.5,\\\"productLocation\\\":\\\"\\\",\\\"upcCode\\\":\\\"\\\",\\\"payType\\\":0,\\\"fixedDownTime\\\":\\\"2017-10-1419:07:15\\\",\\\"fixedStatus\\\":1,\\\"shopCategories\\\":[4192914],\\\"prefixKey\\\":\\\"\\\",\\\"productDescHtml\\\":\\\"http://storage.jd.com/file.pms.o2o.jd.com/2010385483.html?Expires=3084779236&AccessKey=j4kJqiUEyMdML7ir&Signature=ucoB2tG16yZM9bLdFMqEwTQKqQM%3D\\\",\\\"transportAttribute\\\":\\\"1\\\",\\\"sellCities\\\":[0]},{\\\"skuId\\\":2010385467,\\\"outSkuId\\\":\\\"\\\",\\\"orgCode\\\":75208,\\\"categoryId\\\":20469,\\\"brandId\\\":35247,\\\"skuName\\\":\\\"羊腿肉约500g/份\\\",\\\"skuPrice\\\":10000,\\\"stockNum\\\":0,\\\"weight\\\":0.5,\\\"upcCode\\\":\\\"6924387299015\\\",\\\"payType\\\":0,\\\"fixedDownTime\\\":\\\"2017-10-1419:03:11\\\",\\\"fixedStatus\\\":1,\\\"shopCategories\\\":[4192914],\\\"prefixKey\\\":\\\"\\\",\\\"productDescHtml\\\":\\\"http://storage.jd.com/file.pms.o2o.jd.com/2010385467.html?Expires=3084778991&AccessKey=j4kJqiUEyMdML7ir&Signature=WSmT1AuSQrypjGMXsMpgR9bKep4%3D\\\",\\\"sellCities\\\":[0]},{\\\"skuId\\\":2010369339,\\\"outSkuId\\\":\\\"\\\",\\\"orgCode\\\":75208,\\\"categoryId\\\":20356,\\\"brandId\\\":35247,\\\"skuName\\\":\\\"红皮土豆约500g/份\\\",\\\"skuPrice\\\":10000,\\\"stockNum\\\":0,\\\"weight\\\":0.5,\\\"upcCode\\\":\\\"\\\",\\\"payType\\\":0,\\\"fixedUpTime\\\":\\\"2017-10-1315:06:20\\\",\\\"fixedDownTime\\\":\\\"2017-10-1310:04:47\\\",\\\"fixedStatus\\\":1,\\\"shopCategories\\\":[4072276],\\\"prefixKey\\\":\\\"\\\",\\\"sellCities\\\":[0]},{\\\"skuId\\\":2010348937,\\\"outSkuId\\\":\\\"\\\",\\\"orgCode\\\":75208,\\\"categoryId\\\":20273,\\\"brandId\\\":35247,\\\"skuName\\\":\\\"鸭边腿 (冻品)1个 约250-350g/份\\\",\\\"slogan\\\":\\\"\\\",\\\"skuPrice\\\":700,\\\"stockNum\\\":0,\\\"weight\\\":0.5,\\\"productLocation\\\":\\\"\\\",\\\"upcCode\\\":\\\"\\\",\\\"payType\\\":0,\\\"fixedDownTime\\\":\\\"2017-10-1110:39:17\\\",\\\"fixedStatus\\\":1,\\\"shopCategories\\\":[4192925],\\\"prefixKey\\\":\\\"\\\",\\\"transportAttribute\\\":\\\"0\\\",\\\"sellCities\\\":[0]},{\\\"skuId\\\":2010348909,\\\"outSkuId\\\":\\\"\\\",\\\"orgCode\\\":75208,\\\"categoryId\\\":20360,\\\"brandId\\\":35247,\\\"skuName\\\":\\\"西兰花 (带根) 约400g/份\\\",\\\"skuPrice\\\":600,\\\"stockNum\\\":0,\\\"weight\\\":0.5,\\\"productLocation\\\":\\\"\\\",\\\"upcCode\\\":\\\"\\\",\\\"payType\\\":0,\\\"fixedDownTime\\\":\\\"2017-10-1110:36:10\\\",\\\"fixedStatus\\\":1,\\\"shopCategories\\\":[4192710],\\\"prefixKey\\\":\\\"\\\",\\\"sellCities\\\":[0]},{\\\"skuId\\\":2010348324,\\\"outSkuId\\\":\\\"\\\",\\\"orgCode\\\":75208,\\\"categoryId\\\":23019,\\\"brandId\\\":35247,\\\"skuName\\\":\\\"粉蒸排骨 约400g/份\\\",\\\"skuPrice\\\":10000,\\\"stockNum\\\":0,\\\"weight\\\":0.4,\\\"productLocation\\\":\\\"\\\",\\\"upcCode\\\":\\\"\\\",\\\"payType\\\":0,\\\"fixedDownTime\\\":\\\"2017-10-1109:19:29\\\",\\\"fixedStatus\\\":1,\\\"shopCategories\\\":[4214405],\\\"prefixKey\\\":\\\"\\\",\\\"sellCities\\\":[0]},{\\\"skuId\\\":2010348301,\\\"outSkuId\\\":\\\"\\\",\\\"orgCode\\\":75208,\\\"categoryId\\\":22845,\\\"brandId\\\":35247,\\\"skuName\\\":\\\"鸽子蛋 1个 约10g/份\\\",\\\"skuPrice\\\":10000,\\\"stockNum\\\":0,\\\"weight\\\":0.01,\\\"productLocation\\\":\\\"\\\",\\\"upcCode\\\":\\\"\\\",\\\"payType\\\":0,\\\"fixedDownTime\\\":\\\"2017-10-1109:16:12\\\",\\\"fixedStatus\\\":1,\\\"shopCategories\\\":[4315485],\\\"prefixKey\\\":\\\"\\\",\\\"sellCities\\\":[0]},{\\\"skuId\\\":2010270183,\\\"outSkuId\\\":\\\"\\\",\\\"orgCode\\\":75208,\\\"categoryId\\\":20310,\\\"brandId\\\":35247,\\\"skuName\\\":\\\"红心柚 约1-1.2kg/份\\\",\\\"skuPrice\\\":10000,\\\"stockNum\\\":0,\\\"weight\\\":1.2,\\\"productLocation\\\":\\\"\\\",\\\"upcCode\\\":\\\"\\\",\\\"payType\\\":0,\\\"fixedDownTime\\\":\\\"2017-09-2919:43:30\\\",\\\"fixedStatus\\\":1,\\\"shopCategories\\\":[4192736],\\\"prefixKey\\\":\\\"\\\",\\\"sellCities\\\":[0]},{\\\"skuId\\\":2010259309,\\\"outSkuId\\\":\\\"\\\",\\\"orgCode\\\":75208,\\\"categoryId\\\":20356,\\\"brandId\\\":35247,\\\"skuName\\\":\\\"紫薯 约500g/份\\\",\\\"skuPrice\\\":10000,\\\"stockNum\\\":0,\\\"weight\\\":0.5,\\\"productLocation\\\":\\\"\\\",\\\"upcCode\\\":\\\"\\\",\\\"payType\\\":0,\\\"fixedDownTime\\\":\\\"2017-09-2820:46:24\\\",\\\"fixedStatus\\\":1,\\\"shopCategories\\\":[4072276],\\\"prefixKey\\\":\\\"\\\",\\\"sellCities\\\":[0]},{\\\"skuId\\\":2010175451,\\\"outSkuId\\\":\\\"\\\",\\\"orgCode\\\":75208,\\\"categoryId\\\":22410,\\\"brandId\\\":35247,\\\"skuName\\\":\\\"黄桃 约550g/份\\\",\\\"skuPrice\\\":2400,\\\"stockNum\\\":0,\\\"weight\\\":0.55,\\\"upcCode\\\":\\\"\\\",\\\"payType\\\":0,\\\"fixedDownTime\\\":\\\"2017-09-2310:47:50\\\",\\\"fixedStatus\\\":1,\\\"shopCategories\\\":[4192736],\\\"prefixKey\\\":\\\"\\\",\\\"productDescHtml\\\":\\\"http://storage.jd.com/file.pms.o2o.jd.com/2010175451.html?Expires=3082934870&AccessKey=j4kJqiUEyMdML7ir&Signature=kVf5xwR8yg%2BLjrOGMESMRpIkjHw%3D\\\",\\\"isBreakable\\\":1,\\\"transportAttribute\\\":\\\"0\\\",\\\"liquidStatue\\\":\\\"1\\\",\\\"sellCities\\\":[0]},{\\\"skuId\\\":2010156283,\\\"outSkuId\\\":\\\"\\\",\\\"orgCode\\\":75208,\\\"categoryId\\\":20747,\\\"brandId\\\":35247,\\\"skuName\\\":\\\"建华花椒油120ml/瓶\\\",\\\"skuPrice\\\":900,\\\"stockNum\\\":0,\\\"weight\\\":0.1,\\\"upcCode\\\":\\\"6921459701581\\\",\\\"payType\\\":0,\\\"fixedDownTime\\\":\\\"2017-09-2122:52:33\\\",\\\"fixedStatus\\\":1,\\\"shopCategories\\\":[4282483],\\\"prefixKey\\\":\\\"\\\",\\\"isBreakable\\\":1,\\\"liquidStatue\\\":\\\"1\\\",\\\"sellCities\\\":[0]},{\\\"skuId\\\":2010145193,\\\"outSkuId\\\":\\\"\\\",\\\"orgCode\\\":75208,\\\"categoryId\\\":22410,\\\"brandId\\\":35247,\\\"skuName\\\":\\\"去壳板栗500g/份\\\",\\\"skuPrice\\\":10000,\\\"stockNum\\\":0,\\\"weight\\\":0.5,\\\"upcCode\\\":\\\"\\\",\\\"payType\\\":0,\\\"fixedUpTime\\\":\\\"2017-09-2211:59:26\\\",\\\"fixedDownTime\\\":\\\"2017-09-2116:18:50\\\",\\\"fixedStatus\\\":1,\\\"shopCategories\\\":[4192736],\\\"prefixKey\\\":\\\"\\\",\\\"sellCities\\\":[0]},{\\\"skuId\\\":2010121621,\\\"outSkuId\\\":\\\"\\\",\\\"orgCode\\\":75208,\\\"categoryId\\\":20323,\\\"brandId\\\":35247,\\\"skuName\\\":\\\"金鲳鱼 约500g/份\\\",\\\"skuPrice\\\":10000,\\\"stockNum\\\":0,\\\"weight\\\":0.5,\\\"productLocation\\\":\\\"\\\",\\\"upcCode\\\":\\\"\\\",\\\"payType\\\":0,\\\"fixedDownTime\\\":\\\"2017-09-2016:58:15\\\",\\\"fixedStatus\\\":1,\\\"shopCategories\\\":[4214406],\\\"prefixKey\\\":\\\"\\\",\\\"sellCities\\\":[0]},{\\\"skuId\\\":2010076152,\\\"outSkuId\\\":\\\"\\\",\\\"orgCode\\\":75208,\\\"categoryId\\\":20289,\\\"brandId\\\":35247,\\\"skuName\\\":\\\"兔子半只800g/份\\\",\\\"skuPrice\\\":10000,\\\"stockNum\\\":0,\\\"weight\\\":0.8,\\\"upcCode\\\":\\\"\\\",\\\"payType\\\":0,\\\"fixedUpTime\\\":\\\"2017-09-1815:00:10\\\",\\\"fixedDownTime\\\":\\\"2017-09-1810:28:19\\\",\\\"fixedStatus\\\":1,\\\"shopCategories\\\":[4392353],\\\"prefixKey\\\":\\\"\\\",\\\"sellCities\\\":[0]},{\\\"skuId\\\":2010054682,\\\"outSkuId\\\":\\\"\\\",\\\"orgCode\\\":75208,\\\"categoryId\\\":22410,\\\"brandId\\\":35247,\\\"skuName\\\":\\\"青枣 约500g/份\\\",\\\"skuPrice\\\":10000,\\\"stockNum\\\":0,\\\"weight\\\":0.5,\\\"productLocation\\\":\\\"\\\",\\\"upcCode\\\":\\\"\\\",\\\"payType\\\":0,\\\"fixedDownTime\\\":\\\"2017-09-1514:11:17\\\",\\\"fixedStatus\\\":1,\\\"shopCategories\\\":[4192736],\\\"prefixKey\\\":\\\"\\\",\\\"transportAttribute\\\":\\\"1\\\",\\\"sellCities\\\":[0]},{\\\"skuId\\\":2010054678,\\\"outSkuId\\\":\\\"\\\",\\\"orgCode\\\":75208,\\\"categoryId\\\":22410,\\\"brandId\\\":35247,\\\"skuName\\\":\\\"石榴 约450-550g/份\\\",\\\"skuPrice\\\":10000,\\\"stockNum\\\":0,\\\"weight\\\":0.55,\\\"productLocation\\\":\\\"\\\",\\\"upcCode\\\":\\\"\\\",\\\"payType\\\":0,\\\"fixedDownTime\\\":\\\"2017-09-1514:10:24\\\",\\\"fixedStatus\\\":1,\\\"shopCategories\\\":[4192736],\\\"prefixKey\\\":\\\"\\\",\\\"transportAttribute\\\":\\\"1\\\",\\\"sellCities\\\":[0]},{\\\"skuId\\\":2010054672,\\\"outSkuId\\\":\\\"\\\",\\\"orgCode\\\":75208,\\\"categoryId\\\":20314,\\\"brandId\\\":35247,\\\"skuName\\\":\\\"红心猕猴桃 约1500-2kg/份\\\",\\\"skuPrice\\\":10000,\\\"stockNum\\\":0,\\\"weight\\\":2.0,\\\"productLocation\\\":\\\"\\\",\\\"upcCode\\\":\\\"\\\",\\\"payType\\\":0,\\\"fixedDownTime\\\":\\\"2017-09-1514:09:46\\\",\\\"fixedStatus\\\":1,\\\"shopCategories\\\":[4192736],\\\"prefixKey\\\":\\\"\\\",\\\"transportAttribute\\\":\\\"1\\\",\\\"sellCities\\\":[0]},{\\\"skuId\\\":2010054662,\\\"outSkuId\\\":\\\"\\\",\\\"orgCode\\\":75208,\\\"categoryId\\\":20314,\\\"brandId\\\":35247,\\\"skuName\\\":\\\"红心猕猴桃 约500g/份\\\",\\\"skuPrice\\\":10000,\\\"stockNum\\\":0,\\\"weight\\\":0.5,\\\"productLocation\\\":\\\"\\\",\\\"upcCode\\\":\\\"\\\",\\\"payType\\\":0,\\\"fixedDownTime\\\":\\\"2017-09-1514:08:31\\\",\\\"fixedStatus\\\":1,\\\"shopCategories\\\":[4192736],\\\"prefixKey\\\":\\\"\\\",\\\"transportAttribute\\\":\\\"1\\\",\\\"sellCities\\\":[0]},{\\\"skuId\\\":2010028972,\\\"outSkuId\\\":\\\"\\\",\\\"orgCode\\\":75208,\\\"categoryId\\\":20360,\\\"brandId\\\":35247,\\\"skuName\\\":\\\"冬瓜 约500g/份\\\",\\\"skuPrice\\\":300,\\\"stockNum\\\":0,\\\"weight\\\":0.5,\\\"productLocation\\\":\\\"\\\",\\\"upcCode\\\":\\\"\\\",\\\"payType\\\":0,\\\"fixedDownTime\\\":\\\"2017-09-1420:15:44\\\",\\\"fixedStatus\\\":1,\\\"shopCategories\\\":[4192710],\\\"prefixKey\\\":\\\"\\\",\\\"sellCities\\\":[0]},{\\\"skuId\\\":2010019185,\\\"outSkuId\\\":\\\"\\\",\\\"orgCode\\\":75208,\\\"categoryId\\\":20320,\\\"brandId\\\":35247,\\\"skuName\\\":\\\"爬爬虾500g/份\\\",\\\"skuPrice\\\":10000,\\\"stockNum\\\":0,\\\"weight\\\":0.5,\\\"upcCode\\\":\\\"\\\",\\\"payType\\\":0,\\\"fixedUpTime\\\":\\\"2017-09-1510:02:16\\\",\\\"fixedDownTime\\\":\\\"2017-09-1414:11:12\\\",\\\"fixedStatus\\\":1,\\\"shopCategories\\\":[4214406],\\\"prefixKey\\\":\\\"\\\",\\\"sellCities\\\":[0]}]\"},\"detail\":null,\"code\":\"0\",\"success\":true,\"msg\":\"成功\"}","success":true}
要求生成的excel文件如下:
可以使用第三方库,使用第三方库时,需要统计一下效率问题,即CPU信息,完成所花费的时间。
请提供源码和运行后生成的excel文件