
net.arccode.wechat.pay.api.common.parser.json.ObjectJsonParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wechat-pay-sdk Show documentation
Show all versions of wechat-pay-sdk Show documentation
wechat pay SDK, out of the box.
The newest version!
package net.arccode.wechat.pay.api.common.parser.json;
import net.arccode.wechat.pay.api.common.exception.WXPayApiException;
import net.arccode.wechat.pay.api.common.parser.Converter;
import net.arccode.wechat.pay.api.protocol.base.WXPayResponse;
import net.arccode.wechat.pay.api.common.parser.WXPayParser;
/**
* json对象解析器
*
* @author http://arccode.net
* @since 2015-11-06
*/
public class ObjectJsonParser implements WXPayParser {
private Class clazz;
public ObjectJsonParser(Class clazz) {
this.clazz = clazz;
}
@Override
public T parse(String resp) throws WXPayApiException {
Converter converter = new JsonConverter();
return converter.toResponse(resp, clazz);
}
@Override
public Class getResponseClass() {
return clazz;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy