rj2y
This CLI tool is a simple utility to convert JSON to YAML. Especially useful when you want to convert JSON including JSON-embedded string.
{
"iii": "{\"i\":\"{\\\"ii\\\": \\\"ii\\\"}\",\"ii\":\"ii\"}",
"kkk": "{\"k\": \"{\\\"kk\\\": \\\"kk1\\\\nkk2\\\\nkk3\\\\n\\\"}\"}"
}
iii:
i:
ii: !!str ii
ii: !!str ii
kkk:
k:
kk: !!str |-
kk1
kk2
kk3
It may be convenient to reading server logs. Using with jq and yq is recommended.
Installation
pipx install rj2y
Usage
cat some.json | rj2y
rj2y some.json
Example
input json and output yaml
Using yq make it easier to read.
cat some.json | rj2y | yq
aaa: !!str AAA
bbb: !!bool true
ccc: !!int 123
ccc2: !!str 123
ddd: !!float 123.456
ddd2: !!str 123.456
eee:
- !!str e
- !!str ee
- !!str eee
fff:
f: !!str f
ff: !!str ff
fff: !!str fff
ggg:
- g: !!str g
gg: !!str gg
ggg: !!str ggg
- g: !!str g
gg: !!str gg
ggg: !!str ggg
hhh:
h: !!str h
hh: !!str hh
hhh: !!str hhh
iii:
i:
ii: !!str ii
ii: !!str ii
jjj: !!str |-
jj1
jj2
jj3
kkk:
k:
kk: !!str |-
kk1
kk2
kk3
Metadata
Release files for rj2y 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rj2y-0.1.5.tar.gz | 20.8 kB | Without provenance | Details for rj2y-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rj2y-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for rj2y-0.1.5-py3-none-any.whl |
Total release size: 24.3 kB
Release files / rj2y-0.1.5.tar.gz
| Download URL | rj2y-0.1.5.tar.gz |
|---|---|
| Size | 20.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
735874df16d8bea0905426c5b40e02ace4535eea3b8157b023bcea065ff46f4d
|
|
BLAKE2b-256 checksum How to use checksums |
c5bb2708e0cfee885c5283cbce9db753735d5580fd696546b196d3d5a4ca1831
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / rj2y-0.1.5-py3-none-any.whl
| Download URL | rj2y-0.1.5-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a94f5b749685b92e355449a4378a662a36843c75314be41589c2a9075bfec385
|
|
BLAKE2b-256 checksum How to use checksums |
0f139831b143d3078553ea3be412cd340113fa9d3f3d6c860dc6aaa652498447
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for rj2y 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.