Package cloud.opencode.base.yml


package cloud.opencode.base.yml
OpenCode Base YML - YAML Processing Library OpenCode Base YML - YAML 处理库

This package provides comprehensive YAML parsing, binding, and manipulation utilities.

此包提供全面的 YAML 解析、绑定和操作工具。

Key Features | 主要特性

  • YAML parsing and writing with SPI support | 支持 SPI 的 YAML 解析和写入
  • Object binding with annotations | 带注解的对象绑定
  • Placeholder resolution (${...}) | 占位符解析(${...})
  • Document merging | 文档合并
  • Path-based access | 基于路径的访问
  • Security features | 安全特性

Quick Start | 快速开始

// Parse YAML
YmlDocument doc = OpenYml.parse("""
    server:
      port: 8080
      host: localhost
    """);

// Access values
int port = doc.getInt("server.port");
String host = doc.getString("server.host");

// Bind to object
ServerConfig config = OpenYml.bind(doc, "server", ServerConfig.class);

// Write YAML
String yaml = OpenYml.dump(doc);
Since:
JDK 25, opencode-base-yml V1.0.0
Author:
Leon Soo www.LeonSoo.com
See Also: