使用ScriptEngineManager解析json

使用ScriptEngineManager能够解析比較复杂的json串,应用比較方便,可是效率不敢说,由于这种方法相当于执行了一次js。会占资源,

代码例如以下:

try {
							String mdskipJson = "";
							ScriptEngineManager manager = new ScriptEngineManager();
						    ScriptEngine engine = manager.getEngineByName("js");
						    String  s="  var o = " + mdskipJson + ";";
						    try {
						    	 engine.eval(s+" var promotePrice=\"\"; var price=\"\"; var objs=o.defaultModel.itemPriceResultDO.priceInfo;for(var e in objs){price=objs[e].price;promotePrice=objs[e].promotionList[0].price+\"   \";break;}");
						         Object sellCount = engine.eval(s+" o.defaultModel.sellCountDO.sellCount");//月销量
						         Object price = engine.get("price");//原价
						         Object promotePrice = engine.get("promotePrice");//促销价
						         System.out.println("---------------------------");
						         System.out.println(price);
						         System.out.println(sellCount);
						         System.out.println(promotePrice);
						    } catch (Exception e) {
						        e.printStackTrace();
						    } ;
						} catch (Exception e) {
							e.printStackTrace();
						}
</pre><pre>

json串例如以下:

setMdskip({'isSuccess':true,'defaultModel':{'buyerRestrictInfoDO':{'amountRestrictInfoMap':{}},'deliveryDO':{'areaId':320500,'deliveryAddress':'浙江杭州','deliverySkuMap':{'34291470880':[{'money':null,'name':null,'postage':'快递: 6.00 EMS: 12.00 ','postageFree':false,'serviceLinkText':null,'serviceLinkUrl':null,'signText':null,'tagImage':null,'tips':null,'type':0}],'34291470881':[{'money':null,'name':null,'postage':'快递: 6.00 EMS: 12.00 ','postageFree':false,'serviceLinkText':null,'serviceLinkUrl':null,'signText':null,'tagImage':null,'tips':null,'type':0}],'34291470882':[{'money':null,'name':null,'postage':'快递: 6.00 EMS: 12.00 ','postageFree':false,'serviceLinkText':null,'serviceLinkUrl':null,'signText':null,'tagImage':null,'tips':null,'type':0}],'34291470883':[{'money':null,'name':null,'postage':'快递: 6.00 EMS: 12.00 ','postageFree':false,'serviceLinkText':null,'serviceLinkUrl':null,'signText':null,'tagImage':null,'tips':null,'type':0}],'34291470884':[{'money':null,'name':null,'postage':'快递: 6.00 EMS: 12.00 ','postageFree':false,'serviceLinkText':null,'serviceLinkUrl':null,'signText':null,'tagImage':null,'tips':null,'type':0}],'34291470885':[{'money':null,'name':null,'postage':'快递: 6.00 EMS: 12.00 ','postageFree':false,'serviceLinkText':null,'serviceLinkUrl':null,'signText':null,'tagImage':null,'tips':null,'type':0}],'34291470886':[{'money':null,'name':null,'postage':'快递: 6.00 EMS: 12.00 ','postageFree':false,'serviceLinkText':null,'serviceLinkUrl':null,'signText':null,'tagImage':null,'tips':null,'type':0}],'34291470887':[{'money':null,'name':null,'postage':'快递: 6.00 EMS: 12.00 ','postageFree':false,'serviceLinkText':null,'serviceLinkUrl':null,'signText':null,'tagImage':null,'tips':null,'type':0}],'34291470888':[{'money':null,'name':null,'postage':'快递: 6.00 EMS: 12.00 ','postageFree':false,'serviceLinkText':null,'serviceLinkUrl':null,'signText':null,'tagImage':null,'tips':null,'type':0}],'34291470889':[{'money':null,'name':null,'postage':'快递: 6.00 EMS: 12.00 ','postageFree':false,'serviceLinkText':null,'serviceLinkUrl':null,'signText':null,'tagImage':null,'tips':null,'type':0}],'34291470890':[{'money':null,'name':null,'postage':'快递: 6.00 EMS: 12.00 ','postageFree':false,'serviceLinkText':null,'serviceLinkUrl':null,'signText':null,'tagImage':null,'tips':null,'type':0}],'34291470891':[{'money':null,'name':null,'postage':'快递: 6.00 EMS: 12.00 ','postageFree':false,'serviceLinkText':null,'serviceLinkUrl':null,'signText':null,'tagImage':null,'tips':null,'type':0}],'34291470892':[{'money':null,'name':null,'postage':'快递: 6.00 EMS: 12.00 ','postageFree':false,'serviceLinkText':null,'serviceLinkUrl':null,'signText':null,'tagImage':null,'tips':null,'type':0}],'34291470893':[{'money':null,'name':null,'postage':'快递: 6.00 EMS: 12.00 ','postageFree':false,'serviceLinkText':null,'serviceLinkUrl':null,'signText':null,'tagImage':null,'tips':null,'type':0}],'34291470894':[{'money':null,'name':null,'postage':'快递: 6.00 EMS: 12.00 ','postageFree':false,'serviceLinkText':null,'serviceLinkUrl':null,'signText':null,'tagImage':null,'tips':null,'type':0}],'34291470895':[{'money':null,'name':null,'postage':'快递: 6.00 EMS: 12.00 ','postageFree':false,'serviceLinkText':null,'serviceLinkUrl':null,'signText':null,'tagImage':null,'tips':null,'type':0}],'34291470896':[{'money':null,'name':null,'postage':'快递: 6.00 EMS: 12.00 ','postageFree':false,'serviceLinkText':null,'serviceLinkUrl':null,'signText':null,'tagImage':null,'tips':null,'type':0}],'34291470897':[{'money':null,'name':null,'postage':'快递: 6.00 EMS: 12.00 ','postageFree':false,'serviceLinkText':null,'serviceLinkUrl':null,'signText':null,'tagImage':null,'tips':null,'type':0}],'default':[{'money':null,'name':null,'postage':'快递: 6.00 EMS: 12.00 ','postageFree':false,'serviceLinkText':null,'serviceLinkUrl':null,'signText':null,'tagImage':null,'tips':null,'type':0}]},'destination':'苏州市','hasHomeDeliveryService':false,'otherServiceList':[]},'detailPageTipsDO':{'campaignText':null,'hideIcons':false,'icons':null,'itemTitle':null,'jhs99':false,'juOpenTimeStr':null,'minicartSurprise':0,'priceDisplayType':4,'showDou12CornerIcon':false,'warmUpIcons':null,'warmingUpHintText':null},'doubleEleven2014':{'doubleElevenItem':false,'showAtmosphere':false,'showRightRecommendedArea':false,'step':0},'gatewayDO':{'changeLocationGateway':{'i_channel':null,'queryDelivery':true,'queryProm':false},'trade':{'addToBuyNow':{},'addToCart':{}}},'inventoryDO':{'hidden':false,'icTotalQuantity':266,'skuQuantity':{34291470880:{'quantity':0,'totalQuantity':0,'type':1},34291470881:{'quantity':1,'totalQuantity':1,'type':1},34291470882:{'quantity':2,'totalQuantity':2,'type':1},34291470883:{'quantity':64,'totalQuantity':64,'type':1},34291470884:{'quantity':15,'totalQuantity':15,'type':1},34291470885:{'quantity':0,'totalQuantity':0,'type':1},34291470886:{'quantity':0,'totalQuantity':0,'type':1},34291470887:{'quantity':0,'totalQuantity':0,'type':1},34291470888:{'quantity':0,'totalQuantity':0,'type':1},34291470889:{'quantity':0,'totalQuantity':0,'type':1},34291470890:{'quantity':2,'totalQuantity':2,'type':1},34291470891:{'quantity':0,'totalQuantity':0,'type':1},34291470892:{'quantity':0,'totalQuantity':0,'type':1},34291470893:{'quantity':0,'totalQuantity':0,'type':1},34291470894:{'quantity':95,'totalQuantity':95,'type':1},34291470895:{'quantity':87,'totalQuantity':87,'type':1},34291470896:{'quantity':0,'totalQuantity':0,'type':1},34291470897:{'quantity':0,'totalQuantity':0,'type':1}},'success':true,'totalQuantity':266,'type':1},'itemPriceResultDO':{'areaId':320500,'campaignInfo':null,'duo11Item':false,'duo11Stage':0,'extraPromHrefText':null,'extraPromIcon':null,'extraPromShowRealPrice':false,'halfOffItem':false,'hasDPromotion':false,'hasMobileProm':false,'hideMeal':false,'priceInfo':{'34291470880':{'areaSold':true,'encryptDES':null,'localCurrencySymbol':null,'localReferencePrice':null,'price':'399.00','promotionList':[{'add':null,'amountPromLimit':0,'amountRestriction':'','basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':1414724854000,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':3,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'219.90','promText':null,'promType':'normal','start':false,'startTime':1393559627000,'status':2,'type':'春秋促销','typeUrl':null},{'add':null,'amountPromLimit':0,'amountRestriction':null,'basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':null,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':0,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'379.05','promText':'登录后确认是否享有此优惠','promType':'normal','start':false,'startTime':null,'status':2,'type':'店铺vip','typeUrl':null}],'suggestivePromotionList':null,'tagPrice':null,'wrtInfo':null},'34291470881':{'areaSold':true,'encryptDES':null,'localCurrencySymbol':null,'localReferencePrice':null,'price':'399.00','promotionList':[{'add':null,'amountPromLimit':0,'amountRestriction':'','basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':1414724854000,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':3,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'219.90','promText':null,'promType':'normal','start':false,'startTime':1393559627000,'status':2,'type':'春秋促销','typeUrl':null},{'add':null,'amountPromLimit':0,'amountRestriction':null,'basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':null,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':0,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'379.05','promText':'登录后确认是否享有此优惠','promType':'normal','start':false,'startTime':null,'status':2,'type':'店铺vip','typeUrl':null}],'suggestivePromotionList':null,'tagPrice':null,'wrtInfo':null},'34291470882':{'areaSold':true,'encryptDES':null,'localCurrencySymbol':null,'localReferencePrice':null,'price':'399.00','promotionList':[{'add':null,'amountPromLimit':0,'amountRestriction':'','basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':1414724854000,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':3,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'219.90','promText':null,'promType':'normal','start':false,'startTime':1393559627000,'status':2,'type':'春秋促销','typeUrl':null},{'add':null,'amountPromLimit':0,'amountRestriction':null,'basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':null,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':0,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'379.05','promText':'登录后确认是否享有此优惠','promType':'normal','start':false,'startTime':null,'status':2,'type':'店铺vip','typeUrl':null}],'suggestivePromotionList':null,'tagPrice':null,'wrtInfo':null},'34291470883':{'areaSold':true,'encryptDES':null,'localCurrencySymbol':null,'localReferencePrice':null,'price':'399.00','promotionList':[{'add':null,'amountPromLimit':0,'amountRestriction':'','basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':1414724854000,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':3,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'219.90','promText':null,'promType':'normal','start':false,'startTime':1393559627000,'status':2,'type':'春秋促销','typeUrl':null},{'add':null,'amountPromLimit':0,'amountRestriction':null,'basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':null,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':0,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'379.05','promText':'登录后确认是否享有此优惠','promType':'normal','start':false,'startTime':null,'status':2,'type':'店铺vip','typeUrl':null}],'suggestivePromotionList':null,'tagPrice':null,'wrtInfo':null},'34291470884':{'areaSold':true,'encryptDES':null,'localCurrencySymbol':null,'localReferencePrice':null,'price':'399.00','promotionList':[{'add':null,'amountPromLimit':0,'amountRestriction':'','basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':1414724854000,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':3,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'219.90','promText':null,'promType':'normal','start':false,'startTime':1393559627000,'status':2,'type':'春秋促销','typeUrl':null},{'add':null,'amountPromLimit':0,'amountRestriction':null,'basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':null,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':0,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'379.05','promText':'登录后确认是否享有此优惠','promType':'normal','start':false,'startTime':null,'status':2,'type':'店铺vip','typeUrl':null}],'suggestivePromotionList':null,'tagPrice':null,'wrtInfo':null},'34291470885':{'areaSold':true,'encryptDES':null,'localCurrencySymbol':null,'localReferencePrice':null,'price':'399.00','promotionList':[{'add':null,'amountPromLimit':0,'amountRestriction':'','basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':1414724854000,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':3,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'219.90','promText':null,'promType':'normal','start':false,'startTime':1393559627000,'status':2,'type':'春秋促销','typeUrl':null},{'add':null,'amountPromLimit':0,'amountRestriction':null,'basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':null,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':0,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'379.05','promText':'登录后确认是否享有此优惠','promType':'normal','start':false,'startTime':null,'status':2,'type':'店铺vip','typeUrl':null}],'suggestivePromotionList':null,'tagPrice':null,'wrtInfo':null},'34291470886':{'areaSold':true,'encryptDES':null,'localCurrencySymbol':null,'localReferencePrice':null,'price':'399.00','promotionList':[{'add':null,'amountPromLimit':0,'amountRestriction':'','basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':1414724854000,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':3,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'219.90','promText':null,'promType':'normal','start':false,'startTime':1393559627000,'status':2,'type':'春秋促销','typeUrl':null},{'add':null,'amountPromLimit':0,'amountRestriction':null,'basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':null,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':0,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'379.05','promText':'登录后确认是否享有此优惠','promType':'normal','start':false,'startTime':null,'status':2,'type':'店铺vip','typeUrl':null}],'suggestivePromotionList':null,'tagPrice':null,'wrtInfo':null},'34291470887':{'areaSold':true,'encryptDES':null,'localCurrencySymbol':null,'localReferencePrice':null,'price':'399.00','promotionList':[{'add':null,'amountPromLimit':0,'amountRestriction':'','basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':1414724854000,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':3,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'219.90','promText':null,'promType':'normal','start':false,'startTime':1393559627000,'status':2,'type':'春秋促销','typeUrl':null},{'add':null,'amountPromLimit':0,'amountRestriction':null,'basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':null,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':0,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'379.05','promText':'登录后确认是否享有此优惠','promType':'normal','start':false,'startTime':null,'status':2,'type':'店铺vip','typeUrl':null}],'suggestivePromotionList':null,'tagPrice':null,'wrtInfo':null},'34291470888':{'areaSold':true,'encryptDES':null,'localCurrencySymbol':null,'localReferencePrice':null,'price':'399.00','promotionList':[{'add':null,'amountPromLimit':0,'amountRestriction':'','basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':1414724854000,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':3,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'219.90','promText':null,'promType':'normal','start':false,'startTime':1393559627000,'status':2,'type':'春秋促销','typeUrl':null},{'add':null,'amountPromLimit':0,'amountRestriction':null,'basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':null,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':0,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'379.05','promText':'登录后确认是否享有此优惠','promType':'normal','start':false,'startTime':null,'status':2,'type':'店铺vip','typeUrl':null}],'suggestivePromotionList':null,'tagPrice':null,'wrtInfo':null},'34291470889':{'areaSold':true,'encryptDES':null,'localCurrencySymbol':null,'localReferencePrice':null,'price':'399.00','promotionList':[{'add':null,'amountPromLimit':0,'amountRestriction':'','basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':1414724854000,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':3,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'219.90','promText':null,'promType':'normal','start':false,'startTime':1393559627000,'status':2,'type':'春秋促销','typeUrl':null},{'add':null,'amountPromLimit':0,'amountRestriction':null,'basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':null,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':0,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'379.05','promText':'登录后确认是否享有此优惠','promType':'normal','start':false,'startTime':null,'status':2,'type':'店铺vip','typeUrl':null}],'suggestivePromotionList':null,'tagPrice':null,'wrtInfo':null},'34291470890':{'areaSold':true,'encryptDES':null,'localCurrencySymbol':null,'localReferencePrice':null,'price':'399.00','promotionList':[{'add':null,'amountPromLimit':0,'amountRestriction':'','basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':1414724854000,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':3,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'219.90','promText':null,'promType':'normal','start':false,'startTime':1393559627000,'status':2,'type':'春秋促销','typeUrl':null},{'add':null,'amountPromLimit':0,'amountRestriction':null,'basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':null,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':0,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'379.05','promText':'登录后确认是否享有此优惠','promType':'normal','start':false,'startTime':null,'status':2,'type':'店铺vip','typeUrl':null}],'suggestivePromotionList':null,'tagPrice':null,'wrtInfo':null},'34291470891':{'areaSold':true,'encryptDES':null,'localCurrencySymbol':null,'localReferencePrice':null,'price':'399.00','promotionList':[{'add':null,'amountPromLimit':0,'amountRestriction':'','basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':1414724854000,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':3,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'219.90','promText':null,'promType':'normal','start':false,'startTime':1393559627000,'status':2,'type':'春秋促销','typeUrl':null},{'add':null,'amountPromLimit':0,'amountRestriction':null,'basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':null,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':0,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'379.05','promText':'登录后确认是否享有此优惠','promType':'normal','start':false,'startTime':null,'status':2,'type':'店铺vip','typeUrl':null}],'suggestivePromotionList':null,'tagPrice':null,'wrtInfo':null},'34291470892':{'areaSold':true,'encryptDES':null,'localCurrencySymbol':null,'localReferencePrice':null,'price':'399.00','promotionList':[{'add':null,'amountPromLimit':0,'amountRestriction':'','basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':1414724854000,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':3,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'219.90','promText':null,'promType':'normal','start':false,'startTime':1393559627000,'status':2,'type':'春秋促销','typeUrl':null},{'add':null,'amountPromLimit':0,'amountRestriction':null,'basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':null,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':0,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'379.05','promText':'登录后确认是否享有此优惠','promType':'normal','start':false,'startTime':null,'status':2,'type':'店铺vip','typeUrl':null}],'suggestivePromotionList':null,'tagPrice':null,'wrtInfo':null},'34291470893':{'areaSold':true,'encryptDES':null,'localCurrencySymbol':null,'localReferencePrice':null,'price':'399.00','promotionList':[{'add':null,'amountPromLimit':0,'amountRestriction':'','basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':1414724854000,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':3,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'219.90','promText':null,'promType':'normal','start':false,'startTime':1393559627000,'status':2,'type':'春秋促销','typeUrl':null},{'add':null,'amountPromLimit':0,'amountRestriction':null,'basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':null,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':0,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'379.05','promText':'登录后确认是否享有此优惠','promType':'normal','start':false,'startTime':null,'status':2,'type':'店铺vip','typeUrl':null}],'suggestivePromotionList':null,'tagPrice':null,'wrtInfo':null},'34291470894':{'areaSold':true,'encryptDES':null,'localCurrencySymbol':null,'localReferencePrice':null,'price':'399.00','promotionList':[{'add':null,'amountPromLimit':0,'amountRestriction':'','basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':1414724854000,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':3,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'219.90','promText':null,'promType':'normal','start':false,'startTime':1393559627000,'status':2,'type':'春秋促销','typeUrl':null},{'add':null,'amountPromLimit':0,'amountRestriction':null,'basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':null,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':0,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'379.05','promText':'登录后确认是否享有此优惠','promType':'normal','start':false,'startTime':null,'status':2,'type':'店铺vip','typeUrl':null}],'suggestivePromotionList':null,'tagPrice':null,'wrtInfo':null},'34291470895':{'areaSold':true,'encryptDES':null,'localCurrencySymbol':null,'localReferencePrice':null,'price':'399.00','promotionList':[{'add':null,'amountPromLimit':0,'amountRestriction':'','basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':1414724854000,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':3,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'219.90','promText':null,'promType':'normal','start':false,'startTime':1393559627000,'status':2,'type':'春秋促销','typeUrl':null},{'add':null,'amountPromLimit':0,'amountRestriction':null,'basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':null,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':0,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'379.05','promText':'登录后确认是否享有此优惠','promType':'normal','start':false,'startTime':null,'status':2,'type':'店铺vip','typeUrl':null}],'suggestivePromotionList':null,'tagPrice':null,'wrtInfo':null},'34291470896':{'areaSold':true,'encryptDES':null,'localCurrencySymbol':null,'localReferencePrice':null,'price':'399.00','promotionList':[{'add':null,'amountPromLimit':0,'amountRestriction':'','basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':1414724854000,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':3,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'219.90','promText':null,'promType':'normal','start':false,'startTime':1393559627000,'status':2,'type':'春秋促销','typeUrl':null},{'add':null,'amountPromLimit':0,'amountRestriction':null,'basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':null,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':0,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'379.05','promText':'登录后确认是否享有此优惠','promType':'normal','start':false,'startTime':null,'status':2,'type':'店铺vip','typeUrl':null}],'suggestivePromotionList':null,'tagPrice':null,'wrtInfo':null},'34291470897':{'areaSold':true,'encryptDES':null,'localCurrencySymbol':null,'localReferencePrice':null,'price':'399.00','promotionList':[{'add':null,'amountPromLimit':0,'amountRestriction':'','basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':1414724854000,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':3,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'219.90','promText':null,'promType':'normal','start':false,'startTime':1393559627000,'status':2,'type':'春秋促销','typeUrl':null},{'add':null,'amountPromLimit':0,'amountRestriction':null,'basePriceType':'IcPrice','buyerAmountRestriction':null,'canBuyCouponNum':0,'channelCode':null,'endTime':null,'extraPromLocalReferencePrice':null,'extraPromPrice':null,'extraPromText':null,'extraPromTextType':0,'extraPromType':0,'gift':null,'limitProm':false,'limitTime':null,'limitTimeUTC':null,'localReferencePrice':null,'orderAmountRestriction':null,'price':'379.05','promText':'登录后确认是否享有此优惠','promType':'normal','start':false,'startTime':null,'status':2,'type':'店铺vip','typeUrl':null}],'suggestivePromotionList':null,'tagPrice':null,'wrtInfo':null}},'promType':null,'queryProm':false,'taojinbiForHK':null,'tmallShopProm':[{'campaignId':51794010,'campaignName':'做不一样的自己','campaignUrl':'http://marketing.tmall.com/home/tsp/page.htm?id=51794010_61127277','endTime':'1414771199000','participateType':1,'promPlan':[{'msg':'满179元,享包邮'},{'msg':'满200元,享包邮,送20元优惠券'},{'msg':'满300元,享包邮,送50元优惠券'},{'msg':'满400元,享包邮,送100元优惠券'},{'detailMsg':[{'method':{'logistics':{'exclusion':['710000','810000','820000','990100'],'exclusionName':['台湾','香港','澳门','海外'],'selected':true},'logisticsExclusion':['710000','810000','820000','990100'],'logisticsExclusionName':['台湾','香港','澳门','海外'],'man':'179','selectMusicPack':false,'selectedDiscount':false,'selectedEbook':false,'selectedGift':false,'selectedGiftPool':false,'selectedLogistics':true,'selectedShopCoupon':false,'shopCouponValid':false},'promotionLevel':1,'quantity':'179'},{'method':{'logistics':{'exclusion':['710000','810000','820000','990100'],'exclusionName':['台湾','香港','澳门','海外'],'selected':true},'logisticsExclusion':['710000','810000','820000','990100'],'logisticsExclusionName':['台湾','香港','澳门','海外'],'man':'200','selectMusicPack':false,'selectedDiscount':false,'selectedEbook':false,'selectedGift':false,'selectedGiftPool':false,'selectedLogistics':true,'selectedShopCoupon':true,'shopCoupon':{'from':'2014-11-11 00:00:00','price':'20','promotionId':157520461,'selected':true,'startFee':0,'to':'2014-11-30 23:59:59'},'shopCouponFrom':'2014-11-11 00:00:00','shopCouponPrice':'20','shopCouponPromotionId':157520461,'shopCouponTo':'2014-11-30 23:59:59','shopCouponValid':false},'promotionLevel':2,'quantity':'200'},{'method':{'logistics':{'exclusion':['710000','810000','820000','990100'],'exclusionName':['台湾','香港','澳门','海外'],'selected':true},'logisticsExclusion':['710000','810000','820000','990100'],'logisticsExclusionName':['台湾','香港','澳门','海外'],'man':'300','selectMusicPack':false,'selectedDiscount':false,'selectedEbook':false,'selectedGift':false,'selectedGiftPool':false,'selectedLogistics':true,'selectedShopCoupon':true,'shopCoupon':{'from':'2014-11-11 00:00:00','price':'50','promotionId':157652277,'selected':true,'startFee':0,'to':'2014-11-30 23:59:59'},'shopCouponFrom':'2014-11-11 00:00:00','shopCouponPrice':'50','shopCouponPromotionId':157652277,'shopCouponTo':'2014-11-30 23:59:59','shopCouponValid':false},'promotionLevel':3,'quantity':'300'},{'method':{'logistics':{'exclusion':['710000','810000','820000','990100'],'exclusionName':['台湾','香港','澳门','海外'],'selected':true},'logisticsExclusion':['710000','810000','820000','990100'],'logisticsExclusionName':['台湾','香港','澳门','海外'],'man':'400','selectMusicPack':false,'selectedDiscount':false,'selectedEbook':false,'selectedGift':false,'selectedGiftPool':false,'selectedLogistics':true,'selectedShopCoupon':true,'shopCoupon':{'from':'2014-11-11 00:00:00','price':'100','promotionId':157996267,'selected':true,'startFee':0,'to':'2014-11-30 23:59:59'},'shopCouponFrom':'2014-11-11 00:00:00','shopCouponPrice':'100','shopCouponPromotionId':157996267,'shopCouponTo':'2014-11-30 23:59:59','shopCouponValid':false},'promotionLevel':4,'quantity':'400'}],'msg':'','participateType':1,'unit':2}],'startTime':'1413936001000','warmUp':false}],'wanrentuanInfo':null},'memberRightDO':{'activeName':null,'activityId':null,'activityType':0,'level':0,'postageFree':false,'shopMember':false,'success':true,'time':1,'value':0.5},'miscDO':{'bucketId':17,'city':'苏州','cityId':320500,'redirectClientFlag':1,'region':'沧浪区','regionId':320502,'sellCountDown':0,'smartBannerFlag':'top','systemTime':'1414460040208','town':'','townId':0},'sellCountDO':{'cspuSellCountMap':{},'orderPersons':null,'sellCount':802},'specialServiceList':[],'tradeResult':{'cartEnable':true,'cartType':2,'discountText':null,'miniTmallCartEnable':true,'param':null,'sellCountDown':null,'tmallCarFinantialEnable':null,'tradeButtonUrl':null,'tradeDisableTypeEnum':null,'tradeEnable':true,'tradeTextLink':null,'tradeType':null},'userInfoDO':{'activeStatus':0,'juKeBuyerLogin':false,'loginUserType':'buyer','nicker':null,'userId':0}}})
时间: 2024-11-10 14:57:02

使用ScriptEngineManager解析json的相关文章

利用fastjson解析json并通过js&amp;ajax实现页面的无跳转刷新

1.json是一种优秀的数据格式,在移动开发和web开发中经常用到,本例中通过一个小案例讲解如何通过alibaba的开源框架fastjson来解析jason数据格式并通过js实现无跳转刷新 2,新建一个web项目,这是我的项目:我这里直接用servlet写的 注意导包,我这里到了很多无用的包,其实主要的包是下面几个: 这个三个包是必须的,其他都是开发基本web的常用包 3.创建一个domain: package com.keson.domain; import com.thoughtworks.

android之GSON解析JSON

Gson 是 Google 提供的用来在 Java 对象和 JSON 数据之间进行映射的 Java 类库. 比如: <pre name="code" class="java">public class Order { public String id; public String OrderName; @Override public String toString() { return "id:"+id+",OrderNa

C# 解析 json

C# 解析 json JSON(全称为JavaScript Object Notation) 是一种轻量级的数据交换格式.它是基于JavaScript语法标准的一个子集. JSON采用完全独立于语言的文本格式,可以很容易在各种网络.平台和程序之间传输.JSON的语法很简单,易于人阅读和编写,同时也易于机器解析和生成. JSON与XML的比较◆可读性 JSON和XML的可读性相比较而言,由于XML提供辅助的标签,更加适合人阅读和理解.◆文件大小与传输 XML允许使用方便的标签,所以文件尺寸是要比J

使用QtScript库解析Json数组例子

本文转载自:http://blog.sina.com.cn/s/blog_671732440100uwxh.html 使用qtscipt库解析json数组首先在工程文件中加 QT        += script 然后头文件加 #include <QtScript> 然后解析 QString str = "{\"name\":\"xiaotang\", \"age\":\"23\", \"chi

C# 解析JSON格式数据

JSON简介 JSON(全称为JavaScript ObjectNotation) 是一种轻量级的数据交换格式.它是基于JavaScript语法标准的一个子集.JSON采用完全独立于语言的文本格式,可以很容易在各种网络.平台和程序之间传输.JSON的语法很简单,易于人阅读和编写,同时也易于机器解析和生成. JSON与XML的比较 ◆可读性 JSON和XML的可读性相比较而言,由于XML提供辅助的标签,更加适合人阅读和理解. ◆文件大小与传输 XML允许使用方便的标签,所以文件尺寸是要比JSON大

不适用工具类解析Json

解析的数据: { "citycode": "101051301", "citydesc": "黑龙江 双鸭山", "cityname": "双鸭山", "data": [ { "date": "2015-08-29", "icon": "d07|n07", "temperatur

python解析json文件

概念 序列化(Serialization):将对象的状态信息转换为可以存储或可以通过网络传输的过程,传输的格式可以是JSON.XML等.反序列化就是从存储区域(JSON,XML)读取反序列化对象的状态,重新创建该对象. JSON(JavaScript Object Notation):一种轻量级数据交换格式,相对于XML而言更简单,也易于阅读和编写,机器也方便解析和生成,Json是JavaScript中的一个子集. Python2.6开始加入了JSON模块,无需另外下载,Python的Json模

Android中解析JSON形式的数据

1.JSON(JavaScript Object Notation) 定义: 一种轻量级的数据交换格式,具有良好的可读和便于快速编写的特性.业内主流技术为其提供了完整的解决方案(有点类似于正则表达式,获得了当今大部分语言的支持),从而可以在不同平台间进行数据交换.JSON采用兼容性很高的文本格式,同时也具备类似于C语言体系的行为. 2.JSON的结构: (1) Name/Value Pairs(无序的):类似所熟知的Keyed list. Hash table.Disctionary和Assoc

Xamarin调用JSON.net来解析JSON

再来我们要怎么解析JSON格示呢?在.net 中,我们很孰悉的JSON.net,没错,我们依然可以在Xamarin中使用他 感谢社群伟大的贡献 下载网址: http://components.xamarin.com/view/json.net/ 接续上一个项目我们多引入下载后的 Newtonsoft.Json.dll 记得要引入Android 下的 引入后就跟我们平常使用JSON.net 一样首先我们要为Facebook接回来的数据建立一个相对应的Class 这时候我们可以使用 http://j