方法调用: JSON.toJSONString(objVerifyResponse); 版本:fastjson-1.2.40
结果: { maxSeats: "9", msg: "??", routing: { adultPrice: 360, adultTax: 600, adultTaxType: 0, applyType: 0, childPrice: 280, childTax: 494, childTaxType: 0, currency: "RMB", data: "{"adultPrice":360,"adultTax":600,"adultTaxType":0,"applyType":0,"childPrice":280,"childTax":494,"childTaxType":0,"currency":"RMB","fromSegments":[{"aircraftCode":"737","arrAirport":"ICN","arrTime":"2017-11-27T12:05:00.000+09:00","cabin":"K","cabinClass":"1","carrier":"H1","codeShare":false,"depAirport":"TAO","depTime":"2017-11-27T09:30:00.000+08:00","flightNumber":"5885","stopCities":"TAO/ICN"}],"nationalityType":0,"priceType":0,"retSegments":[],"ticketInvoiceType":0,"ticketTimeLimit":120}", fromSegments: [ { aircraftCode: "737", arrAirport: "ICN", arrTime: "2017-11-27T12:05:00.000+09:00", cabin: "K", cabinClass: "1", carrier: "H1", codeShare: false, depAirport: "TAO", depTime: "2017-11-27T09:30:00.000+08:00", flightNumber: "5885", stopCities: "TAO/ICN" } ], nationalityType: 0, priceType: 0, retSegments: [ ], ticketInvoiceType: 0, ticketTimeLimit: 120 }, rule: { baggage: "???????", endorse: "???????", endorsement: 1, hasBaggage: 1, hasEndorse: 1, hasNoShow: 1, hasRefund: 1, noShowLimitTime: 1, partEndorse: 1, partEndorsePrice: 1, partRefund: 1, partRefundPrice: 1, penalty: 2, refund: "???????", specialNoShow: 0, status: 0 }, sessionId: "a713d7e1-0f39-4bf4-9279-7a925b2e59cd", status: 0 }
????号的都是中文输出
@RequestMapping( produces={"application/json;charset=UTF-8"}) 能解决问题, 但是JSON.toJSONString(objSearchResponse);不能在序列化的时候指定编码吗