本文整理了Java中javax.json.JsonObject.isNull()
方法的一些代码示例,展示了JsonObject.isNull()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonObject.isNull()
方法的具体详情如下:
包路径:javax.json.JsonObject
类名称:JsonObject
方法名:isNull
暂无
代码示例来源:origin: kiegroup/optaplanner
if (!timeslotObject.isNull("talk")) {
scheduleTalk(timeslotObject, room, timeslot);
代码示例来源:origin: jeremylong/DependencyCheck
} else {
final JsonObject lo = array.getJsonObject(x);
if (lo.containsKey("type") && !lo.isNull("type")
&& lo.containsKey("url") && !lo.isNull("url")) {
final String license = String.format("%s (%s)", lo.getString("type"), lo.getString("url"));
sb.append(license);
} else if (lo.containsKey("type") && !lo.isNull("type")) {
sb.append(lo.getString("type"));
} else if (lo.containsKey("url") && !lo.isNull("url")) {
sb.append(lo.getString("url"));
代码示例来源:origin: hyperledger/fabric-sdk-java
throw new RevocationException("Failed to return CRL, revoke response is empty");
if (resp.isNull("CRL")) {
throw new RevocationException("Failed to return CRL");
代码示例来源:origin: hyperledger/fabric-sdk-java
throw new RevocationException("Failed to return CRL, revoke response is empty");
if (resp.isNull("CRL")) {
throw new RevocationException("Failed to return CRL");
代码示例来源:origin: hyperledger/fabric-sdk-java
throw new RevocationException("Failed to return CRL, revoke response is empty");
if (resp.isNull("CRL")) {
throw new RevocationException("Failed to return CRL");
代码示例来源:origin: org.epics/vtype-json
@Override
public boolean isNull(String string) {
return json.isNull(string);
}
代码示例来源:origin: org.diirt/vtype-json
@Override
public boolean isNull(String string) {
return json.isNull(string);
}
代码示例来源:origin: amihaiemil/docker-java-api
@Override
public final boolean isNull(final String name) {
return this.resource.isNull(name);
}
代码示例来源:origin: jcabi/jcabi-github
/**
* Does it have an author?
* @return TRUE if the author exists
* @throws IOException If there is any I/O problem
*/
public boolean hasAuthor() throws IOException {
return !this.event.json().isNull("actor");
}
/**
代码示例来源:origin: ioFog/Agent
/**
* Validate the request
* MessageWebsocketHandler
* @param jsonObject
* @return String
*/
private void validateRequest(JsonObject jsonObject) throws Exception {
if (!jsonObject.containsKey("id") ||
jsonObject.isNull("id") ||
jsonObject.getString("id").trim().equals(""))
throw new Exception(" Id value not found ");
}
代码示例来源:origin: ioFog/Agent
/**
* Validate the request
*
* @param jsonObject
* @return String
*/
private void validateRequest(JsonObject jsonObject) throws Exception {
if (!jsonObject.containsKey("id") ||
jsonObject.isNull("id") ||
jsonObject.getString("id").trim().equals(""))
throw new Exception(" Id value not found ");
}
代码示例来源:origin: ioFog/Agent
/**
* ping IOFog controller
*
* @return ping result
* @throws Exception
*/
public boolean ping() throws Exception {
try {
JsonObject result = getJSON(controllerUrl + "status");
return !result.isNull("status");
} catch (Exception exp) {
logWarning(MODULE_NAME, exp.getMessage());
throw exp;
}
}
代码示例来源:origin: jcabi/jcabi-github
/**
* Is it a pull request?
* @return TRUE if it is a pull request
* @throws IOException If there is any I/O problem
*/
public boolean isPull() throws IOException {
return this.json().containsKey("pull_request")
&& !this.jsn.value("pull_request", JsonObject.class)
.isNull("html_url");
}
代码示例来源:origin: k0kubun/gitstar-ranking
public List<Repository> getPublicRepos(Integer userId, boolean isOrganization)
throws IOException
{
List<Repository> repos = new ArrayList<>();
for (JsonObject node : getPublicRepoNodes(userId, isOrganization)) {
try {
Long id = decodeRepositoryId(node.getString("id"));
String encodedOwnerId = node.getJsonObject("owner").getString("id");
Integer ownerId = isOrganization ? decodeOrganizationId(encodedOwnerId) : decodeUserId(encodedOwnerId);
String name = node.getString("name");
String fullName = node.getString("nameWithOwner");
String description = node.isNull("description") ? null : node.getString("description");
Boolean fork = node.getBoolean("isFork");
String homepage = node.isNull("homepageUrl") ? null : node.getString("homepageUrl");
int stargazersCount = node.getJsonObject("stargazers").getInt("totalCount");
String language = node.isNull("primaryLanguage") ? null : node.getJsonObject("primaryLanguage").getString("name");
repos.add(new Repository(id, ownerId, name, fullName, description, fork, homepage, stargazersCount, language));
}
catch (ClassCastException e) {
Sentry.capture(e);
LOG.debug("node: " + node.toString());
throw e;
}
}
return repos;
}
代码示例来源:origin: org.hyperledger.fabric-sdk-java/fabric-sdk-java
throw new RevocationException("Failed to return CRL, revoke response is empty");
if (resp.isNull("CRL")) {
throw new RevocationException("Failed to return CRL");
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
throw new RevocationException("Failed to return CRL, revoke response is empty");
if (resp.isNull("CRL")) {
throw new RevocationException("Failed to return CRL");
代码示例来源:origin: org.hyperledger.fabric-sdk-java/fabric-sdk-java
throw new RevocationException("Failed to return CRL, revoke response is empty");
if (resp.isNull("CRL")) {
throw new RevocationException("Failed to return CRL");
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
throw new RevocationException("Failed to return CRL, revoke response is empty");
if (resp.isNull("CRL")) {
throw new RevocationException("Failed to return CRL");
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
throw new RevocationException("Failed to return CRL, revoke response is empty");
if (resp.isNull("CRL")) {
throw new RevocationException("Failed to return CRL");
代码示例来源:origin: org.hyperledger.fabric-sdk-java/fabric-sdk-java
throw new RevocationException("Failed to return CRL, revoke response is empty");
if (resp.isNull("CRL")) {
throw new RevocationException("Failed to return CRL");
内容来源于网络,如有侵权,请联系作者删除!