Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/decorators-squad/eo-yaml
YAML for Java 8 and above. A user-friendly OOP library. Previously known as "Camel".
https://github.com/decorators-squad/eo-yaml
elegantobjects java8 java9 module oop-library parsing yaml
Last synced: 3 days ago
JSON representation
YAML for Java 8 and above. A user-friendly OOP library. Previously known as "Camel".
- Host: GitHub
- URL: https://github.com/decorators-squad/eo-yaml
- Owner: decorators-squad
- License: bsd-3-clause
- Created: 2016-12-28T10:34:25.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-11-13T12:06:37.000Z (about 1 month ago)
- Last Synced: 2024-12-15T03:03:25.843Z (10 days ago)
- Topics: elegantobjects, java8, java9, module, oop-library, parsing, yaml
- Language: Java
- Homepage:
- Size: 1.8 MB
- Stars: 264
- Watchers: 14
- Forks: 52
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# eo-yaml
[![Coverage Status](https://coveralls.io/repos/github/decorators-squad/eo-yaml/badge.svg?branch=master)](https://coveralls.io/github/decorators-squad/eo-yaml?branch=master)
[![Managed By Self XDSD](https://docs.self-xdsd.com/img/mbself.svg)](https://self-xdsd.com/p/decorators-squad/eo-yaml?provider=github)
[![DevOps By Rultor.com](http://www.rultor.com/b/decorators-squad/eo-yaml)](http://www.rultor.com/p/decorators-squad/eo-yaml)
[![We recommend IntelliJ IDEA](http://amihaiemil.github.io/images/intellij-idea-recommend.svg)](https://www.jetbrains.com/idea/)
[![OpenJDK Quality Outreach](https://amihaiemil.com/images/openjdk_quality_outreach.svg)](https://wiki.openjdk.java.net/display/quality/Quality+Outreach)YAML for Java 8 and above. Based on [spec 1.2](http://www.yaml.org/spec/1.2/spec.html).
From the [specification](http://yaml.org/spec/1.2/spec.html): **YAML™** is a human-friendly, cross language, Unicode based data serialization language.
To get the latest release from Maven Central, simply add the following to your ``pom.xml``:
```xml
com.amihaiemil.web
eo-yaml
8.0.6```
or download the fat jar.
If you use Gradle, add this to your dependencies:
```gradle
implementation group: 'com.amihaiemil.web', name: 'eo-yaml', version: '8.0.6'
```The releases are also available on [Github Packages](https://github.com/decorators-squad/eo-yaml/packages)!
## Usage
The API of this library is clean, intuitive and generally close to the ``javax.json`` API that most developers are used to.
Just start from the ``com.amihaiemil.eoyaml.Yaml`` class, it offers all the builders and readers you may need.See the [Block Style Yaml](https://github.com/decorators-squad/eo-yaml/wiki/Block-Style-YAML) wiki for a first glance.
## Features detailed (ongoing work!)
Here is what we have so far:
* Building and Reading Block YAML ([wiki](https://github.com/decorators-squad/eo-yaml/wiki/Block-Style-YAML));
* Flow-style/JSON-Like representation ([wiki](https://github.com/decorators-squad/eo-yaml/wiki/Flow-Style-(JSON%E2%80%90like)-YAML));
* Support for Folded and Literal Block Scalars ([wiki](https://github.com/decorators-squad/eo-yaml/wiki/Folded-and-Literal-Block-Scalars));
* Convenience Type-Casting Methods ([wiki](https://github.com/decorators-squad/eo-yaml/wiki/Convenience-Type-Casting-Methods));
* Support for Comments ([wiki](https://github.com/decorators-squad/eo-yaml/wiki/Support-For-Comments));
* Convenient ``YamlPrinter`` ([wiki](https://github.com/decorators-squad/eo-yaml/wiki/YAML-Printer));
* Easy Extension Thanks to Interfaces ([wiki](https://github.com/decorators-squad/eo-yaml/wiki/Easy-Extension-Via-Interfaces));
* Building and Reading YAML Streams, integrated with Java 8's Stream API ([wiki](https://github.com/decorators-squad/eo-yaml/wiki/YAML-Streams));
* Java Beans to YAML ([wiki](https://github.com/decorators-squad/eo-yaml/wiki/Java-Bean-To-YAML));
* JSON to/from YAML ([wiki](https://github.com/decorators-squad/eo-yaml/wiki/JSON-to-or-from-YAML));
* YAML Visitor ([wiki](https://github.com/decorators-squad/eo-yaml/wiki/YAML-Visitor));
* Others:
- Clear and detailed Exceptions. For instance, in the case of bad indentation, it will tell you exactly which line is problematic and why.
- Fully encapsulated. The user works only with a few Java Interfaces.
- All objects are immutable and thread-safe.
- It can be used as a **Java Module** (if you're on JDK 9+).
- It is **lightweight**! It has 0 dependencies.Here is what we're **still missing and working on**:
* Aliases, anchors and tags
* YAML to Java Bean**Keep in mind** that the library is based on interfaces and OOP best practices, so you can probably extend/decorate the objects in order to create the functionality you need, if it's not yet implemented.
If you have some time and like the library, please consider contributing.
## Contribute
Contributors are welcome!
1. Open an issue regarding an improvement you thought of, or a bug you noticed, or ask to be assigned to an existing one.
2. If the issue is confirmed, fork the repository, do the changes on a separate branch and make a Pull Request.
3. After review and acceptance, the PR is merged and closed.Make sure the maven build
``$ mvn clean install -Pcheckstyle,itcases``
**passes before making a PR**.