本文整理了Java中io.fabric8.funktion.support.YamlHelper
类的一些代码示例,展示了YamlHelper
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlHelper
类的具体详情如下:
包路径:io.fabric8.funktion.support.YamlHelper
类名称:YamlHelper
暂无
代码示例来源:origin: funktionio/funktion-connectors
private static String convertToYaml(String jSonSchema) {
try {
ObjectMapper mapper = new ObjectMapper();
Object value = mapper.readerFor(Map.class).readValue(jSonSchema);
if (value != null) {
// lets add the order fields
if (value instanceof Map) {
Map<?,?> map = (Map) value;
for (Map.Entry entry : map.entrySet()) {
Object child = entry.getValue();
if (value instanceof Map) {
addOrderFields((Map) child);
}
}
}
return YamlHelper.createYamlMapper().writeValueAsString(value);
}
} catch (IOException e) {
LOG.info("Failed to convert JSON " + jSonSchema + " to YAML: " + e, e);
}
return null;
}
代码示例来源:origin: funktionio/funktion-connectors
Objects.notNull(funktion, "funktion");
try {
String yaml = createYamlMapper().writeValueAsString(funktion);
data.put(DataKeys.Subscription.FUNKTION_YAML, yaml);
} catch (JsonProcessingException e) {
代码示例来源:origin: funktionio/funktion-connectors
endSpec().endTemplate().endSpec().build();
try {
String deploymentYaml = YamlHelper.createYamlMapper().writeValueAsString(deployment);
data.put(DataKeys.Connector.DEPLOYMENT_YAML, deploymentYaml);
} catch (JsonProcessingException e) {
代码示例来源:origin: funktionio/funktion-connectors
configMapFile.getParentFile().mkdirs();
ObjectMapper yamlMapper = createYamlMapper();
yamlMapper.writer().writeValue(configMapFile, configMap);
count++;
内容来源于网络,如有侵权,请联系作者删除!