- 对应json是这样的:
{"alipay_trade_refund_response":{"code":"10000","msg":"Success","buyer_logon_id":"250***@qq.com","buyer_user_id":"2088312601320183","fund_change":"Y","gmt_refund_pay":"2016-07-21 15:32:39","open_id":"20881009092171344200077291812718","out_trade_no":"201605051417158819","refund_detail_item_list":[{"amount":"0.01","fund_channel":"ALIPAYACCOUNT"}],"refund_fee":"0.01","send_back_fee":"0.01","trade_no":"2016050521001004180235368850"},"sign":"SNg6pyF3QysWMBRQnIxJ3jdPch6ve17f01MSc3SWsrMgpCkYWiAabS81U3HjIWg5UIuG1bjpWk/oC8rZ2uUs0+2x9cOIycg5Cmlbg/B70oL4fsENeJm5HuMI/xe4RpX2osHG75HUdOlfKN+ZKoZfGwZ5UsPPcw5gLQ133uK+DN4="}
对应实体结构大致咋建立,才能取到code等属性
之前用Json.fromJsonAsMap方法 建立的实体
报错:
BorningException:Fail to born 'com.wx.bussiness.po.RefundRespond'
by args: [
@(SNg6pyF3QysWMBRQnIxJ3jdPch6ve17f01MSc3SWsrMgpCkYWiAabS81U3HjIWg5UIuG1bjpWk/oC8rZ2uUs0+2x9cOIycg5Cmlbg/B70oL4fsENeJm5HuMI/xe4RpX2osHG75HUdOlfKN+ZKoZfGwZ5UsPPcw5gLQ133uK+DN4=)]
at org.nutz.castor.Castors.cast(Castors.java:264)
at org.nutz.castor.Castors.castTo(Castors.java:318)
at org.nutz.mapl.impl.convert.ObjConvertImpl.injectMap(ObjConvertImpl.java:133)
at org.nutz.mapl.impl.convert.ObjConvertImpl.inject(ObjConvertImpl.java:77)
at org.nutz.mapl.impl.convert.ObjConvertImpl.convert(ObjConvertImpl.java:65)
at org.nutz.mapl.Mapl.maplistToObj(Mapl.java:34)
at org.nutz.json.Json.parse(Json.java:77)
at org.nutz.json.Json.fromJson(Json.java:71)
at org.nutz.json.Json.fromJson(Json.java:93)
at org.nutz.json.Json.fromJsonAsMap(Json.java:392)
at com.gd.cmp.test.MessageTest.main(MessageTest.java:53)
菜鸟一枚,求指导!