All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.api.internal.parser.xml.ObjectXmlParser Maven / Gradle / Ivy

The newest version!
package com.aliyun.api.internal.parser.xml;

import com.aliyun.api.AliyunParser;
import com.aliyun.api.AliyunResponse;
import com.aliyun.api.internal.mapping.Converter;
import com.taobao.api.ApiException;

/**
 * 单个JSON对象解释器。
 * 
 * @author lijie.ma
 * @since 1.0, May 19, 2014
 */
public class ObjectXmlParser implements AliyunParser {

	private Class clazz;

	public ObjectXmlParser(Class clazz) {
		this.clazz = clazz;
	}

	public T parse(String rsp) throws ApiException {
		Converter converter = new XmlConverter();
		return converter.toResponse(rsp, clazz);
	}

	public Class getResponseClass() {
		return clazz;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy