Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tcd/json-table-format
Format JSON in rows & columns
https://github.com/tcd/json-table-format
Last synced: 5 days ago
JSON representation
Format JSON in rows & columns
- Host: GitHub
- URL: https://github.com/tcd/json-table-format
- Owner: tcd
- License: mit
- Created: 2022-01-05T15:01:10.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-03-26T19:32:49.000Z (over 2 years ago)
- Last Synced: 2024-08-09T05:50:21.656Z (3 months ago)
- Language: TypeScript
- Homepage:
- Size: 241 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# json-table-format
## Usage
First, install:
```bash
npm install -g json-table-format
```Second, use:
```bash
# prints to STDOUT by default
json-table-format ./path/to/file.json# or you can format the file in-place
json-table-format ./path/to/file.json --overwrite
```## What does it do?
### JSON goes in like this
```json
{
"firstName": {
"type": "string",
"description": "The person's first name."
},
"lastName": {
"type": "string",
"description": "The person's last name."
},
"age": {
"description": "Age in years which must be equal to or greater than zero.",
"type": "integer",
"minimum": 0
}
}
```### JSON comes out like this
```json
{
"firstName": { "type": "string", "description": "The person's first name." },
"lastName": { "type": "string", "description": "The person's last name." },
"age": { "type": "integer", "description": "Age in years which must be equal to or greater than zero.", "minimum": 0 }
}
```## References
- [JSON Lines](https://jsonlines.org/examples/)
- [rhysd/fixjson](https://github.com/rhysd/fixjson)