Annotaml

libraryjava

A Java library for generating YAML files from Java classes via annotations

Annotaml

Discord

Annotaml is a library for generating YAML files from Java classes. It uses SnakeYAML for parsing and saving YAML files, providing an extremely easy and intuitive way of reading and writing yaml (configuration) files to objects through a set of Java annotations.

Annotate a configuration object to your liking and load/reload it to/from a YAML file with defaults, without having to bother working with reading and writing to/from keyed routes.

Requires Java 11+.

Installation

Annotaml is available on JitPack. You can browse the Javadocs here.

Maven

To use the library on Maven, in your pom.xml file, first add the JitPack repository:

    <repositories>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>

Then, add the dependency in your <dependencies> section. Remember to replace Tag with the current Annotaml version.

    <dependency>
        <groupId>net.william278</groupId>
        <artifactId>Annotaml</artifactId>
        <version>Tag</version>
        <scope>compile</scope>
    </dependency>

Gradle & others

JitPack has a handy guide for how to use the dependency with other build platforms.

Usage

WIP Browse the Javadocs for more methods and information.

License

Annotaml is licensed under Apache-2.0.