Commit 86e6a2a4 authored by neo's avatar neo

[dev] use fast json deseriliazer

parent edd638df
package pwc.taxtech.atms.vat.service.impl; package pwc.taxtech.atms.vat.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference; import com.alibaba.fastjson.TypeReference;
import com.google.gson.Gson; import com.google.gson.Gson;
import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.CloseableHttpResponse;
...@@ -53,7 +54,7 @@ public class InputInvoiceDataImportServiceImpl extends VatAbstractService { ...@@ -53,7 +54,7 @@ public class InputInvoiceDataImportServiceImpl extends VatAbstractService {
+ "&code=" + code + "&period=" + period); + "&code=" + code + "&period=" + period);
try (CloseableHttpResponse response = httpclient.execute(httpget)) { try (CloseableHttpResponse response = httpclient.execute(httpget)) {
String inputStr = EntityUtils.toString(response.getEntity()); String inputStr = EntityUtils.toString(response.getEntity());
pageInput = new Gson().fromJson(inputStr, new TypeReference<PageImpl<InputInvoice>>() { pageInput = JSONObject.parseObject(inputStr, new TypeReference<PageImpl<InputInvoice>>() {
}.getType()); }.getType());
} }
} catch (IOException e) { } catch (IOException e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment