@Yaml public class Employee { @YamlProperty("name") private String name; @YamlProperty("age") private int age; // Getters and setters } YamlIO yamlIO = new YamlIO(); String yamlString = yamlIO.toYaml(employee); Employee deserializedEmployee = yamlIO.fromYaml(yamlString, Employee.class);


上一篇:
下一篇:
切换中文