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
- Host: GitHub
- URL: https://github.com/g-w1/jyamlj
- Owner: g-w1
- Created: 2021-02-08T03:44:52.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-18T19:46:49.000Z (over 5 years ago)
- Last Synced: 2025-07-31T22:57:10.956Z (11 months ago)
- Topics: java, json, yaml
- Language: Java
- Homepage:
- Size: 104 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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!