com.aliyuncs.unmarshaller.JsonUnmashaller Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aliyun-java-sdk-core Show documentation
Show all versions of aliyun-java-sdk-core Show documentation
Aliyun Open API SDK for Java
Copyright (C) Alibaba Cloud Computing
All rights reserved.
版权所有 (C)阿里云计算有限公司
http://www.aliyun.com
package com.aliyuncs.unmarshaller;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.exceptions.ClientException;
import com.aliyuncs.http.HttpResponse;
import com.google.gson.Gson;
/**
* @author VK.Gao
* @date 2018/04/11
*/
public class JsonUnmashaller implements Unmarshaller {
@Override
public T unmarshal(Class clazz, HttpResponse httpResponse) throws ClientException {
String jsonContent = httpResponse.getHttpContentString();
return (new Gson()).fromJson(jsonContent, clazz);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy