gpt4 book ai didi

com.sap.cloud.lm.sl.mta.util.YamlUtil类的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 13:26:31 27 4
gpt4 key购买 nike

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

YamlUtil介绍

暂无

代码示例

代码示例来源:origin: cloudfoundry-incubator/multiapps-controller

private static byte[] toBinaryYaml(Object object) {
  String yaml = YamlUtil.convertToYaml(object);
  return yaml.getBytes(StandardCharsets.UTF_8);
}

代码示例来源:origin: com.sap.cloud.lm.sl/com.sap.cloud.lm.sl.mta

public ExtensionDescriptor parseExtensionDescriptorYaml(InputStream yaml) throws ParsingException {
  // TODO: Java 9 - Remove the second variable (https://blogs.oracle.com/darcy/more-concise-try-with-resources-statements-in-jdk-9).
  try (InputStream closableYaml = yaml) {
    return parseExtensionDescriptor(YamlUtil.convertYamlToMap(closableYaml));
  } catch (IOException e) {
    throw new IllegalStateException(e.getMessage(), e);
  }
}

代码示例来源:origin: com.sap.cloud.lm.sl/com.sap.cloud.lm.sl.mta

@SuppressWarnings("unchecked")
public static Map<String, Object> convertYamlToMap(String yaml) throws ParsingException {
  try {
    return (Map<String, Object>) new Yaml(new YamlTaggedObjectsConstructor()).load(yaml);
  } catch (Exception e) {
    throw new ParsingException(e, constructParsingExceptionMessage(e, yaml));
  }
}

代码示例来源:origin: com.sap.cloud.lm.sl/com.sap.cloud.lm.sl.mta

@SuppressWarnings("unchecked")
public static List<Object> convertYamlToList(String yaml) throws ParsingException {
  try {
    return (List<Object>) new Yaml(new YamlTaggedObjectsConstructor()).load(yaml);
  } catch (Exception e) {
    throw new ParsingException(e, constructParsingExceptionMessage(e, yaml));
  }
}

代码示例来源:origin: com.sap.cloud.lm.sl/com.sap.cloud.lm.sl.mta

public DeploymentDescriptor parseDeploymentDescriptorYaml(InputStream yaml) throws ParsingException {
  // TODO: Java 9 - Remove the second variable (https://blogs.oracle.com/darcy/more-concise-try-with-resources-statements-in-jdk-9).
  try (InputStream closableYaml = yaml) {
    return parseDeploymentDescriptor(YamlUtil.convertYamlToMap(closableYaml));
  } catch (IOException e) {
    throw new IllegalStateException(e.getMessage(), e);
  }
}

代码示例来源:origin: com.sap.cloud.lm.sl.cf/com.sap.cloud.lm.sl.cf.process

private static byte[] toBinaryYaml(Object object) {
  String yaml = YamlUtil.convertToYaml(object);
  return yaml.getBytes(StandardCharsets.UTF_8);
}

代码示例来源:origin: com.sap.cloud.lm.sl/com.sap.cloud.lm.sl.mta

public ExtensionDescriptor parseExtensionDescriptor(String yaml) {
  Map<String, Object> descriptor = YamlUtil.convertYamlToMap(yaml);
  return parseExtensionDescriptor(descriptor);
}

代码示例来源:origin: com.sap.cloud.lm.sl/com.sap.cloud.lm.sl.mta

public ExtensionDescriptor parseExtensionDescriptorYaml(String yaml) throws ParsingException {
  return parseExtensionDescriptor(YamlUtil.convertYamlToMap(yaml));
}

代码示例来源:origin: com.sap.cloud.lm.sl/com.sap.cloud.lm.sl.mta

public DeploymentDescriptor parseDeploymentDescriptor(InputStream yaml) {
  Map<String, Object> descriptor = YamlUtil.convertYamlToMap(yaml);
  return parseDeploymentDescriptor(descriptor);
}

代码示例来源:origin: com.sap.cloud.lm.sl/com.sap.cloud.lm.sl.mta

public DeploymentDescriptor parseDeploymentDescriptor(String yaml) {
  Map<String, Object> descriptor = YamlUtil.convertYamlToMap(yaml);
  return parseDeploymentDescriptor(descriptor);
}

代码示例来源:origin: com.sap.cloud.lm.sl/com.sap.cloud.lm.sl.mta

public ExtensionDescriptor parseExtensionDescriptor(InputStream yaml) {
  Map<String, Object> descriptor = YamlUtil.convertYamlToMap(yaml);
  return parseExtensionDescriptor(descriptor);
}

代码示例来源:origin: com.sap.cloud.lm.sl/com.sap.cloud.lm.sl.mta

public DeploymentDescriptor parseDeploymentDescriptorYaml(String yaml) throws ParsingException {
  return parseDeploymentDescriptor(YamlUtil.convertYamlToMap(yaml));
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com