Code Monkey home page Code Monkey logo

eo-yaml's Introduction

eo-yaml

eo-yaml-logo

Build Status Coverage Status

Managed By Self XDSD 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>7.0.8</version>
</dependency>

or download the fat jar.

If you use Gradle, add this to your dependencies:

implementation group: 'com.amihaiemil.web', name: 'eo-yaml', version: '7.0.8'

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 from 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:
    • 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.

eo-yaml's People

Contributors

amihaiemil avatar rultor avatar portlek avatar sherifwaly avatar salikjan avatar anadrowski avatar zsandoz avatar criske avatar treblereel avatar coder-hugo avatar rocket-3 avatar lacinoire avatar peng1104 avatar dependabot[bot] avatar newmana avatar tehbrian avatar giraciopide avatar njdoyle avatar bkm016 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.