Camel

YAML for Java. User-friendly OOP library.

License

License

GroupId

GroupId

com.amihaiemil.web
ArtifactId

ArtifactId

camel
Last Version

Last Version

1.0.3
Release Date

Release Date

Type

Type

jar
Description

Description

Camel
YAML for Java. User-friendly OOP library.
Project URL

Project URL

https://www.github.com/decorators-squad/camel
Source Code Management

Source Code Management

https://github.com/amihaiemil/camel

Download camel

How to add to project

<!-- https://jarcasting.com/artifacts/com.amihaiemil.web/camel/ -->
<dependency>
    <groupId>com.amihaiemil.web</groupId>
    <artifactId>camel</artifactId>
    <version>1.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.amihaiemil.web/camel/
implementation 'com.amihaiemil.web:camel:1.0.3'
// https://jarcasting.com/artifacts/com.amihaiemil.web/camel/
implementation ("com.amihaiemil.web:camel:1.0.3")
'com.amihaiemil.web:camel:jar:1.0.3'
<dependency org="com.amihaiemil.web" name="camel" rev="1.0.3">
  <artifact name="camel" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.amihaiemil.web', module='camel', version='1.0.3')
)
libraryDependencies += "com.amihaiemil.web" % "camel" % "1.0.3"
[com.amihaiemil.web/camel "1.0.3"]

Dependencies

compile (2)

Group / Artifact Type Version
org.slf4j : slf4j-log4j12 jar 1.7.21
commons-beanutils : commons-beanutils jar 1.9.3

test (4)

Group / Artifact Type Version
junit : junit jar 4.12
org.mockito : mockito-all jar 1.9.5
org.hamcrest : hamcrest-all jar 1.3
commons-io : commons-io jar 2.5

Project Modules

There are no modules declared in this project.

eo-yaml

eo-yaml-logo

Build Status Coverage Status PDD status

DevOps By Rultor.com We recommend IntelliJ IDEA OpenJDK Quality Outreach

winner

YAML for Java 8 and above. Based on spec 1.2.

From the specification: 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:

<dependency>
    <groupId>com.amihaiemil.web</groupId>
    <artifactId>eo-yaml</artifactId>
    <version>5.1.6</version>
</dependency>

or download the fat jar.

The releases are also available on Github 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 form the com.amihaiemil.eoyaml.Yaml class, it offers all the builders and readers you may need.

See the 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);
  • Support for Folded and Literal Block Scalars (wiki);
  • Convenience Type-Casting Methods (wiki);
  • Editing of YAML (wiki);
  • Support for Comments (wiki);
  • Convenient YamlPrinter (wiki);
  • Easy Extension Thanks to Interfaces (wiki);
  • Building and Reading YAML Streams, integrated with Java 8's Stream API (wiki);
  • Java Beans to YAML (wiki);
  • Others:
    • Automatic validation of the input's indentation (wiki).
    • 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.

Also, you can have a look under src/test/resources to see the kinds of YAML that the library can read and handle so far.

Here is what we're still missing and working on:

  • Flow and Recursive representation
  • Aliases and anchors
  • 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.

Versions

Version
1.0.3
1.0.2
1.0.1
1.0.0