本文整理了Java中org.rapidoid.data.YAML
类的一些代码示例,展示了YAML
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YAML
类的具体详情如下:
包路径:org.rapidoid.data.YAML
类名称:YAML
暂无
代码示例来源:origin: rapidoid/rapidoid
@SuppressWarnings("unchecked")
public static Map<String, Object> parseMap(String yaml) {
return parse(yaml, Map.class);
}
代码示例来源:origin: rapidoid/rapidoid
public static void bootstrap(Setup setup) {
OpenAPIDescriptor descriptor = new OpenAPIDescriptor(setup, Conf.OPENAPI);
setup.get(Msc.specialUri("api/openapi.json"))
.internal(true)
.json(descriptor::getAPIDocs);
setup.get(Msc.specialUri("api/openapi.yaml"))
.internal(true)
.plain(() -> YAML.stringify(descriptor.getAPIDocs()));
}
代码示例来源:origin: rapidoid/rapidoid
@SuppressWarnings("unchecked")
public static PageMenu parse(String filename) {
byte[] yaml = Res.from(filename).getBytesOrNull();
Map<String, ?> data = yaml != null ? YAML.parse(yaml, Map.class) : null;
return from(data);
}
代码示例来源:origin: rapidoid/rapidoid
return YAML.parse(data, targetType);
} catch (Exception e) {
if (firstException == null) {
代码示例来源:origin: org.rapidoid/rapidoid-jackson
@SuppressWarnings("unchecked")
public static Map<String, Object> parseMap(String yaml) {
return parse(yaml, Map.class);
}
代码示例来源:origin: org.rapidoid/rapidoid-jackson
return YAML.parse(data, targetType);
} catch (Exception e) {
if (firstException == null) {
内容来源于网络,如有侵权,请联系作者删除!