| Crates.io | rekson |
| lib.rs | rekson |
| version | 0.0.2 |
| created_at | 2024-11-09 12:57:26.998235+00 |
| updated_at | 2024-12-06 15:08:27.841792+00 |
| description | A simple standalone to rectify json |
| homepage | https://github.com/pinbraerts/rekson |
| repository | https://github.com/pinbraerts/rekson |
| max_upload_size | |
| id | 1442059 |
| size | 19,006 |
rectify your json
I frequently edit json files.
It is a completely unusable configuration language with poorly written grammar.
So I came up with a simple program to fix manually edited json.
This is not a formatter, rather it is intended to be used in conjunction with one,
for example jq.
{,"a":3,} -> {"a":3})[1 2] -> [1, 2]){`key`: 'value'} -> {"key": "value"})True -> true)None -> null){a:3} -> {"a":3}){"a"=3} -> {"a":3}){b 4} -> {"b":4}){[{[{]] -> {[{[{}]}]})((),()) -> [[],[]])0xff -> 256)cargo install rekson
cargo install --git https://github.com/pinbraerts/rekson
Prebuilt binaries can be found at the releases page.
Pass dirty json to stdin, receive fixed json in stdout.
require("conform").setup({
formatters = {
rekson = {
command = "rekson",
},
},
formatters_by_ft = {
json = { "rekson" },
})
})