javax.json.JsonPointer.getValue()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(7.6k)|赞(0)|评价(0)|浏览(91)

本文整理了Java中javax.json.JsonPointer.getValue()方法的一些代码示例,展示了JsonPointer.getValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonPointer.getValue()方法的具体详情如下:
包路径:javax.json.JsonPointer
类名称:JsonPointer
方法名:getValue

JsonPointer.getValue介绍

[英]Get the JsonValue at the position referenced by this JsonPointer.
[中]在此JsonPointer引用的位置获取JsonValue。

代码示例

代码示例来源:origin: wildfly/wildfly

/**
   * Get the value referenced by the provided JSON Pointer in the JsonStructure.
   *
   * @param jsonPointer the JSON Pointer
   * @return the {@code JsonValue} at the referenced location
   * @throws JsonException if the JSON Pointer is malformed, or if it references
   *     a non-existing member or value.
   *
   * @since 1.1
   */
  default public JsonValue getValue(String jsonPointer) {
    return Json.createPointer(jsonPointer).getValue(this);
  }
}

代码示例来源:origin: wildfly/wildfly

case COPY:
  from = getPointer(operation, "from");
  return pointer.add(target, from.getValue(target));
case MOVE:
  return pointer.add(from.remove(target), from.getValue(target));
case TEST:
  if (! getValue(operation).equals(pointer.getValue(target))) {
    throw new JsonException(JsonMessages.PATCH_TEST_FAILED(operation.getString("path"), getValue(operation).toString()));

代码示例来源:origin: org.glassfish/javax.json

case COPY:
  from = getPointer(operation, "from");
  return pointer.add(target, from.getValue(target));
case MOVE:
  return pointer.add(from.remove(target), from.getValue(target));
case TEST:
  if (! getValue(operation).equals(pointer.getValue(target))) {
    throw new JsonException(JsonMessages.PATCH_TEST_FAILED(operation.getString("path"), getValue(operation).toString()));

代码示例来源:origin: javax/javaee-web-api

/**
   * Get the value referenced by the provided JSON Pointer in the JsonStructure.
   *
   * @param jsonPointer the JSON Pointer
   * @return the {@code JsonValue} at the referenced location
   * @throws JsonException if the JSON Pointer is malformed, or if it references
   *     a non-existing member or value.
   *
   * @since 1.1
   */
  default public JsonValue getValue(String jsonPointer) {
    return Json.createPointer(jsonPointer).getValue(this);
  }
}

代码示例来源:origin: org.talend.sdk.component/component-runtime-manager

private Object extractValue(final JsonObject payload) {
  if (!pointer.containsValue(payload)) {
    return null;
  }
  return ofNullable(pointer.getValue(payload)).map(this::mapValue).orElse(null);
}

代码示例来源:origin: javax.json/javax.json-api

/**
   * Get the value referenced by the provided JSON Pointer in the JsonStructure.
   *
   * @param jsonPointer the JSON Pointer
   * @return the {@code JsonValue} at the referenced location
   * @throws JsonException if the JSON Pointer is malformed, or if it references
   *     a non-existing member or value.
   *
   * @since 1.1
   */
  default public JsonValue getValue(String jsonPointer) {
    return Json.createPointer(jsonPointer).getValue(this);
  }
}

代码示例来源:origin: jboss/jboss-javaee-specs

/**
   * Get the value referenced by the provided JSON Pointer in the JsonStructure.
   *
   * @param jsonPointer the JSON Pointer
   * @return the {@code JsonValue} at the referenced location
   * @throws JsonException if the JSON Pointer is malformed, or if it references
   *     a non-existing member or value.
   *
   * @since 1.1
   */
  default public JsonValue getValue(String jsonPointer) {
    return Json.createPointer(jsonPointer).getValue(this);
  }
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
   * Get the value referenced by the provided JSON Pointer in the JsonStructure.
   *
   * @param jsonPointer the JSON Pointer
   * @return the {@code JsonValue} at the referenced location
   * @throws JsonException if the JSON Pointer is malformed, or if it references
   *     a non-existing member or value.
   *
   * @since 1.1
   */
  default public JsonValue getValue(String jsonPointer) {
    return Json.createPointer(jsonPointer).getValue(this);
  }
}

代码示例来源:origin: jakarta.json/jakarta.json-api

/**
   * Get the value referenced by the provided JSON Pointer in the JsonStructure.
   *
   * @param jsonPointer the JSON Pointer
   * @return the {@code JsonValue} at the referenced location
   * @throws JsonException if the JSON Pointer is malformed, or if it references
   *     a non-existing member or value.
   *
   * @since 1.1
   */
  default public JsonValue getValue(String jsonPointer) {
    return Json.createPointer(jsonPointer).getValue(this);
  }
}

代码示例来源:origin: javaee/jsonp

/**
   * Get the value referenced by the provided JSON Pointer in the JsonStructure.
   *
   * @param jsonPointer the JSON Pointer
   * @return the {@code JsonValue} at the referenced location
   * @throws JsonException if the JSON Pointer is malformed, or if it references
   *     a non-existing member or value.
   *
   * @since 1.1
   */
  default public JsonValue getValue(String jsonPointer) {
    return Json.createPointer(jsonPointer).getValue(this);
  }
}

代码示例来源:origin: eclipse-ee4j/jsonp

/**
   * Get the value referenced by the provided JSON Pointer in the JsonStructure.
   *
   * @param jsonPointer the JSON Pointer
   * @return the {@code JsonValue} at the referenced location
   * @throws JsonException if the JSON Pointer is malformed, or if it references
   *     a non-existing member or value.
   *
   * @since 1.1
   */
  default public JsonValue getValue(String jsonPointer) {
    return Json.createPointer(jsonPointer).getValue(this);
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

/**
   * Get the value referenced by the provided JSON Pointer in the JsonStructure.
   *
   * @param jsonPointer the JSON Pointer
   * @return the {@code JsonValue} at the referenced location
   * @throws JsonException if the JSON Pointer is malformed, or if it references
   *     a non-existing member or value.
   *
   * @since 1.1
   */
  default public JsonValue getValue(String jsonPointer) {
    return Json.createPointer(jsonPointer).getValue(this);
  }
}

代码示例来源:origin: eclipse-ee4j/jsonp

/**
   * Get the value referenced by the provided JSON Pointer in the JsonStructure.
   *
   * @param jsonPointer the JSON Pointer
   * @return the {@code JsonValue} at the referenced location
   * @throws JsonException if the JSON Pointer is malformed, or if it references
   *     a non-existing member or value.
   *
   * @since 1.1
   */
  default public JsonValue getValue(String jsonPointer) {
    return Json.createPointer(jsonPointer).getValue(this);
  }
}

代码示例来源:origin: org.talend.sdk.component/component-server-proxy

public Optional<String> findEnclosedFormId(final String type, final String lang, final JsonObject payload) {
  return doEnrich(type, lang,
      patch -> ofNullable(patch.getTypePointer())
          .map(it -> it.getValue(payload))
          .filter(it -> it.getValueType() == STRING)
          .map(it -> JsonString.class.cast(it).getString())
          .orElseThrow(() -> new IllegalArgumentException(
              "No form identifier available, check your server configuration.")));
}

代码示例来源:origin: org.apache.geronimo.specs/geronimo-json_1.1_spec

default JsonValue getValue(String jsonPointer) {
    return JsonProvider.provider().createPointer(jsonPointer).getValue(this);
  }
}

代码示例来源:origin: apache/meecrowave

default JsonValue getValue(String jsonPointer) {
    return JsonProvider.provider().createPointer(jsonPointer).getValue(this);
  }
}

代码示例来源:origin: org.apache.meecrowave/meecrowave-specs-api

default JsonValue getValue(String jsonPointer) {
    return JsonProvider.provider().createPointer(jsonPointer).getValue(this);
  }
}

代码示例来源:origin: org.glassfish/jakarta.json

case COPY:
  from = getPointer(operation, "from");
  return pointer.add(target, from.getValue(target));
case MOVE:
  return pointer.add(from.remove(target), from.getValue(target));
case TEST:
  if (! getValue(operation).equals(pointer.getValue(target))) {
    throw new JsonException(JsonMessages.PATCH_TEST_FAILED(operation.getString("path"), getValue(operation).toString()));

代码示例来源:origin: org.jboss.eap/wildfly-client-all

case COPY:
  from = getPointer(operation, "from");
  return pointer.add(target, from.getValue(target));
case MOVE:
  return pointer.add(from.remove(target), from.getValue(target));
case TEST:
  if (! getValue(operation).equals(pointer.getValue(target))) {
    throw new JsonException(JsonMessages.PATCH_TEST_FAILED(operation.getString("path"), getValue(operation).toString()));

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

case COPY:
  from = getPointer(operation, "from");
  return pointer.add(target, from.getValue(target));
case MOVE:
  return pointer.add(from.remove(target), from.getValue(target));
case TEST:
  if (! getValue(operation).equals(pointer.getValue(target))) {
    throw new JsonException(JsonMessages.PATCH_TEST_FAILED(operation.getString("path"), getValue(operation).toString()));

相关文章