An open API service indexing awesome lists of open source software.

https://github.com/g-w1/jyamlj

a json formatter/converter to yaml in java
https://github.com/g-w1/jyamlj

java json yaml

Last synced: about 2 months ago
JSON representation

a json formatter/converter to yaml in java

Awesome Lists containing this project

README

          

# jyamlj

Java Yaml Json

Convert from `json `to `yaml`/`json`.

Useful if you don't understand `yaml` but like `json`.

## Usage:
```
jyamlj:
usage: jyamlj [-j] [-y]
-j: output json (default)
-y: output yaml
pipe the json you want to parse and render to stdin
```

## Building
In the root dir do `gradle assembleDist`.
You will find a `.tar` and a `.zip` in `build/distributions/`
you can unzip these files and you will find a `bin` folder with 2 files:
`jyamlj` and `jyamlj.bat`

Use the `jyamlj` file in unixy systems and `jyamlj.bat` on Windows to run jyamlj.

## Example Usage:

### Yaml Output:
```
❯ echo "{\"a\":[1,2,3]}" | jyamlj -y
a: - 1
- 2
- - 3
-
```

### Json Output:
```
❯ echo "{\"a\":[1,2,3]}" | jyamlj -j
{
"a": [
1,
2,
3
]
}
```

TODO:

* [x] json lexer
* [x] json parser
* [x] json renderer
* [x] yaml renderer
* [x] tests
* [x] publish/cli!