本文整理了Java中com.jayway.jsonpath.Configuration.getOptions()
方法的一些代码示例,展示了Configuration.getOptions()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.getOptions()
方法的具体详情如下:
包路径:com.jayway.jsonpath.Configuration
类名称:Configuration
方法名:getOptions
[英]Returns the options used by this configuration
[中]返回此配置使用的选项
代码示例来源:origin: json-path/JsonPath
public Set<Option> options() {
return configuration.getOptions();
}
代码示例来源:origin: pentaho/pentaho-kettle
private Configuration deleteOptionFromConfiguration( Configuration config, Option option ) {
Configuration currentConf = config;
if ( currentConf != null ) {
EnumSet<Option> currentOptions = EnumSet.noneOf( Option.class );
currentOptions.addAll( currentConf.getOptions() );
if ( currentOptions.remove( option ) ) {
if ( log.isDebug() ) {
log.logDebug( BaseMessages.getString( PKG, "JsonReader.Debug.Configuration.Option.Delete", option ) );
}
currentConf = Configuration.defaultConfiguration().addOptions( currentOptions.toArray( new Option[currentOptions.size()] ) );
}
}
if ( log.isDebug() ) {
log.logDebug( BaseMessages.getString( PKG, "JsonReader.Debug.Configuration.Options", currentConf.getOptions() ) );
}
return currentConf;
}
代码示例来源:origin: apache/geode
private void saveDefaults() {
try {
Configuration defaultConfiguration = Configuration.defaultConfiguration();
this.jsonProvider = defaultConfiguration.jsonProvider();
this.mappingProvider = defaultConfiguration.mappingProvider();
this.options = defaultConfiguration.getOptions();
this.hadDefaults = true;
} catch (NoClassDefFoundError ignore) {
this.hadDefaults = false;
}
}
代码示例来源:origin: com.jayway.jsonpath/json-path
public Set<Option> options() {
return configuration.getOptions();
}
代码示例来源:origin: line/centraldogma
@Override
public Set<Option> options() {
return jsonPathCfg.getOptions();
}
代码示例来源:origin: com.github.lafa.jsonpath/json-path
public Set<Option> options() {
return configuration.getOptions();
}
代码示例来源:origin: org.apache.camel/camel-jsonpath
if (configuration.getOptions().contains(SUPPRESS_EXCEPTIONS)) {
if (configuration.getOptions().contains(ALWAYS_RETURN_LIST)) {
return Collections.emptyList();
} else {
代码示例来源:origin: batfish/batfish
public JsonPathTest() {
Configuration.setDefaults(BatfishJsonPathDefaults.INSTANCE);
ConfigurationBuilder b = new ConfigurationBuilder();
_baseConfiguration = b.build();
_oneNtpServerNodesAnswerStr =
CommonUtil.readResource("org/batfish/question/jsonpath/oneNtpServer.json");
_oneNtpServerNodesAnswerJsonObject =
JsonPath.parse(_oneNtpServerNodesAnswerStr, _baseConfiguration).json();
_twoNtpServersNodesAnswerStr =
CommonUtil.readResource("org/batfish/question/jsonpath/twoNtpServers.json");
_twoNtpServersNodesAnswerJsonObject =
JsonPath.parse(_twoNtpServersNodesAnswerStr, _baseConfiguration).json();
ConfigurationBuilder prefixCb = new ConfigurationBuilder();
prefixCb.mappingProvider(_baseConfiguration.mappingProvider());
prefixCb.jsonProvider(_baseConfiguration.jsonProvider());
prefixCb.evaluationListener(_baseConfiguration.getEvaluationListeners());
prefixCb.options(_baseConfiguration.getOptions());
prefixCb.options(Option.ALWAYS_RETURN_LIST);
prefixCb.options(Option.AS_PATH_LIST);
_prefixConfiguration = prefixCb.build();
}
内容来源于网络,如有侵权,请联系作者删除!