All Projects → Carleslc → Simple-YAML

Carleslc / Simple-YAML

Licence: GPL-3.0 License
A Java API that provides an easy-to-use way to store data using the YAML format.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Simple-YAML

Strictyaml
Type-safe YAML parser and validator.
Stars: ✭ 836 (+1129.41%)
Mutual labels:  yaml, serialization, configuration, yml
parse it
A python library for parsing multiple types of config files, envvars & command line arguments that takes the headache out of setting app configurations.
Stars: ✭ 86 (+26.47%)
Mutual labels:  yaml, configuration, configuration-file
coqpit
Simple but maybe too simple config management through python data classes. We use it for machine learning.
Stars: ✭ 67 (-1.47%)
Mutual labels:  yaml, serialization, config-management
Carvel Ytt
YAML templating tool that works on YAML structure instead of text
Stars: ✭ 816 (+1100%)
Mutual labels:  yaml, configuration, yml
python-yamlable
A thin wrapper of PyYaml to convert Python objects to YAML and back
Stars: ✭ 28 (-58.82%)
Mutual labels:  yaml, object, format
cfg-rs
A Configuration Library for Rust Applications
Stars: ✭ 18 (-73.53%)
Mutual labels:  yaml, configuration
apollo.net
Apollo配置中心.Net客户端
Stars: ✭ 449 (+560.29%)
Mutual labels:  config-management, configuration
climatecontrol
Python library for loading settings and config data from files and environment variables
Stars: ✭ 20 (-70.59%)
Mutual labels:  yaml, configuration
goodconf
Transparently load variables from environment or JSON/YAML file.
Stars: ✭ 80 (+17.65%)
Mutual labels:  yaml, configuration
paerser
No description or website provided.
Stars: ✭ 38 (-44.12%)
Mutual labels:  yaml, configuration
theconf
Python Package for Managing Configurations
Stars: ✭ 35 (-48.53%)
Mutual labels:  yaml, config-management
yaask
Make your yaml configurable with interactive configurations!
Stars: ✭ 15 (-77.94%)
Mutual labels:  yaml, configuration
vscode-yaml-sort
This VS Code extension exposes the possibility to sort, format and validate yaml files.
Stars: ✭ 25 (-63.24%)
Mutual labels:  yaml, yaml-format
go-config
Configuration file loader for Go
Stars: ✭ 27 (-60.29%)
Mutual labels:  yaml, configuration
exenv
Exenv makes loading environment variables from external sources easy.
Stars: ✭ 35 (-48.53%)
Mutual labels:  yaml, yml
icingaweb2-module-fileshipper
Provide CSV, JSON, XML and YAML files as an Import Source for the Icinga Director and optionally ship hand-crafted additional Icinga2 config files
Stars: ✭ 25 (-63.24%)
Mutual labels:  yaml, configuration
dataconf
Simple dataclasses configuration management for Python with hocon/json/yaml/properties/env-vars/dict support.
Stars: ✭ 40 (-41.18%)
Mutual labels:  yaml, serialization
crystalizer
(De)serialize any Crystal object - out of the box. Supports JSON, YAML and Byte format.
Stars: ✭ 32 (-52.94%)
Mutual labels:  yaml, serialization
config-parser
A slim, fully managed C# library for reading/writing .ini, .conf, .cfg etc configuration files.
Stars: ✭ 67 (-1.47%)
Mutual labels:  configuration, configuration-file
hikaru
Move smoothly between Kubernetes YAML and Python for creating/updating/componentizing configurations.
Stars: ✭ 60 (-11.76%)
Mutual labels:  yaml, yaml-files

Simple YAML API

Latest version Build Status

This Java API provides an easy-to-use way to store data and provide configurations using the YAML format.

ko-fi

What is YAML?

YAML is a human-readable data-oriented serialization language.

Serialization is the process of translating data structures or object state into a format that can be stored and reconstructed later in the same or another computer environment.

You can learn more about YAML language here. Specifically, if you're interested to learn about the YAML syntax you can go to the Chapter 2 of the YAML specification.

Filename extensions: .yaml, .yml

What is Simple-YAML?

This API is a port from Bukkit configuration wrapper with some features added, so you can use this library wherever you want without Bukkit dependency.

Simplicity is added with the class YamlFile, which is an extension of YamlConfiguration, with easy use for creation, management and serialization of yaml files. This class is probably the only class you will need.

Furthermore, you can optionally save your files with comments in mind. With the original YamlConfiguration that is not possible, because if you save the file from code then all previous comments in the file will be removed. You can write your comments with a text editor as usual. In addition, not only you can preserve your comments but also with this API you can add comments programmatically to your configuration. Sounds good, right?

How to install

To use this API all you need is to download the latest Simple-Yaml.jar and put it as a dependency on your project.

Maven

If you are using Maven you do not need to download the jar. Instead, add this repository and dependency to your pom.xml:

<repositories>
    <repository>
      <id>jitpack.io</id>
      <url>https://jitpack.io</url>
    </repository>
</repositories>
Yaml + Configuration
<dependency>
    <groupId>me.carleslc.Simple-YAML</groupId>
    <artifactId>Simple-Yaml</artifactId>
    <version>1.7.3</version>
</dependency>
Configuration only
<dependency>
    <groupId>me.carleslc.Simple-YAML</groupId>
    <artifactId>Simple-Configuration</artifactId>
    <version>1.7.3</version>
</dependency>

Gradle

If you are using Gradle you do not need to download the jar. Instead, add this repository and dependency to your build file:

allprojects {
  repositories {
    maven { url 'https://jitpack.io' }
  }
}
Yaml + Configuration
dependencies {
  implementation 'me.carleslc.Simple-YAML:Simple-Yaml:1.7.3'
}
Configuration only
dependencies {
  implementation 'me.carleslc.Simple-YAML:Simple-Configuration:1.7.3'
}

How to use

The best way to learn how to use this API is through some examples.

You can find some examples to test here.

  • YamlExample: An example to create YAML files, save or delete simple values and move through the file configuration.
  • YamlCommentsExample: An example to load and save YAML files keeping comments.
  • YamlEncodingExample: A minimal example to check your encoding with Unicode characters.
  • YamlSerializationExample: An example for saving complex objects using serialization.
  • Person: An example of class for complex objects used in the previous file. Here you can see how to serialize and deserialize objects.

Example .yml files here.

For more information and methods see the Javadoc:

Dependencies

This API uses SnakeYAML, which is already included in the latest Simple-Yaml.jar, so you don't have to worry about anything more than putting up the jar as a dependency on your project.

Looking for other file type configurations?

Have a look to these repositories:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].