Code Monkey home page Code Monkey logo

jaml's Introduction

JAML

Easy-to-use JSON <=> YAML converter

Latest stable release MIT License

Usage

Input format is detected automatically, hence:

Converting YAML to JSON

# The classic way:
jaml <file.yaml|url-to-yaml-contents>

# or using piped standard input:
cat file.yaml | jaml

Converting JSON to YAML

# The classic way:
jaml <file.json|url-to-json-contents>

# or using piped standard input:
cat file.json | jaml

Examples

Converting remote JSON contents over https

jaml https://repo.packagist.org/packages/list.json?vendor=yannoff

Output:

packageNames:
    - yannoff/collections
    - yannoff/composer-dotenv-handler
    - yannoff/console
    - yannoff/handyman
    - yannoff/lumiere-ui
    - yannoff/lumiere-utils
    - yannoff/symfony-boilerplate
    - yannoff/y-a-m-l
    - yannoff/yamltools

Converting a YAML file contents

jaml composer.yaml

Output:

{
    "name": "yannoff/jaml",
    "description": "Easy-to-use JSON <=> YAML converter",
    "type": "project",
    "license": "MIT",
    "authors": [
        {
            "name": "Yannoff",
            "homepage": "https://github.com/yannoff"
        }
    ],
    "autoload": {
        "psr-4": {
            "Yannoff\\Jaml\\": "src/"
        }
    },
    "require": {
        "yannoff/console": "^2.0",
        "yannoff/yamltools": "^1.5"
    }
}

Available options

-i, --interactive

Run in interactive mode

-h, --help

Display help message

-v, --verbose

Increase the verbosity of jaml output

--version

Display version and exit

Installation

Requirements

Quick install

Get the latest release and install it

curl -Lo /usr/bin/jaml https://github.com/yannoff/jaml/releases/latest/download/jaml
chmod +x /usr/bin/jaml

๐Ÿ’ก The /usr/bin/jaml path is just an example, fell free to replace by any custom binary file path.

Checksums

Some checksum files are available to verify the jaml binary integrity:

Here is an example using PHP

echo hash_file('sha384', 'https://github.com/yannoff/jaml/releases/latest/download/jaml');

Credits

JAML leverages offenbach for PHP dependency management.

Compiled as a PHAR self-executable using PHP Code Compiler.

License

Licensed under the MIT License.

jaml's People

Contributors

yannoff avatar

Watchers

 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.