本文整理了Java中com.alibaba.fastjson.JSONObject.getShortValue()
方法的一些代码示例,展示了JSONObject.getShortValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSONObject.getShortValue()
方法的具体详情如下:
包路径:com.alibaba.fastjson.JSONObject
类名称:JSONObject
方法名:getShortValue
暂无
代码示例来源:origin: ltsopensource/light-task-scheduler
@Override
public short getShortValue(String key) {
return jsonObject.getShortValue(key);
}
代码示例来源:origin: ltsopensource/light-task-scheduler
@Override
public short getShortValue(String key) {
return jsonObject.getShortValue(key);
}
代码示例来源:origin: jmdhappy/xxpay-master
/**
* 初始化支付宝配置
* @param configParam
* @return
*/
public AlipayConfig init(String configParam) {
Assert.notNull(configParam, "init alipay config error");
JSONObject paramObj = JSON.parseObject(configParam);
this.setApp_id(paramObj.getString("appid"));
this.setRsa_private_key(paramObj.getString("private_key"));
this.setAlipay_public_key(paramObj.getString("alipay_public_key"));
this.setIsSandbox(paramObj.getShortValue("isSandbox"));
if(this.getIsSandbox() == 1) this.setUrl("https://openapi.alipaydev.com/gateway.do");
return this;
}
代码示例来源:origin: jmdhappy/xxpay-master
/**
* 初始化支付宝配置
* @param configParam
* @return
*/
public AlipayConfig init(String configParam) {
Assert.notNull(configParam, "init alipay config error");
JSONObject paramObj = JSON.parseObject(configParam);
this.setApp_id(paramObj.getString("appid"));
this.setRsa_private_key(paramObj.getString("private_key"));
this.setAlipay_public_key(paramObj.getString("alipay_public_key"));
this.setIsSandbox(paramObj.getShortValue("isSandbox"));
if(this.getIsSandbox() == 1) this.setUrl("https://openapi.alipaydev.com/gateway.do");
return this;
}
代码示例来源:origin: jmdhappy/xxpay-master
/**
* 初始化支付宝配置
* @param configParam
* @return
*/
public AlipayConfig init(String configParam) {
Assert.notNull(configParam, "init alipay config error");
JSONObject paramObj = JSON.parseObject(configParam);
this.setApp_id(paramObj.getString("appid"));
this.setRsa_private_key(paramObj.getString("private_key"));
this.setAlipay_public_key(paramObj.getString("alipay_public_key"));
this.setIsSandbox(paramObj.getShortValue("isSandbox"));
if(this.getIsSandbox() == 1) this.setUrl("https://openapi.alipaydev.com/gateway.do");
return this;
}
代码示例来源:origin: com.github.ltsopensource/lts-core
@Override
public short getShortValue(String key) {
return jsonObject.getShortValue(key);
}
代码示例来源:origin: syhily/elasticsearch-jdbc
@Override
public short getShortValue(String key) {
return jsonObject.getShortValue(key);
}
代码示例来源:origin: whvcse/EasyWeb
/**
* 得到shortValue类型的值
*/
public static short getShortValue(String json, String key) {
short result = 0;
try {
JSONObject jsonObject = JSON.parseObject(json);
result = jsonObject.getShortValue(key);
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
内容来源于网络,如有侵权,请联系作者删除!