https://github.com/hlcfan/fm
Content agnostic formatter for JSON, XML string. Indent incomplete JSON.
https://github.com/hlcfan/fm
json xml
Last synced: 5 months ago
JSON representation
Content agnostic formatter for JSON, XML string. Indent incomplete JSON.
- Host: GitHub
- URL: https://github.com/hlcfan/fm
- Owner: hlcfan
- License: mit
- Created: 2022-10-08T11:06:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-19T07:00:19.000Z (about 1 year ago)
- Last Synced: 2025-04-19T14:19:48.243Z (about 1 year ago)
- Topics: json, xml
- Language: Go
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fm
Format JSON, XML string. I mainly use it in Vim buffers, so that I can format
any JSON/XML string without knowing type.
Before:
```
# format JSON
:%! jq .
# format XML
:%! xmllint --format -
```
After:
```
:%! fm
```
### Usage
```
echo "{\"key\":\"value\"}" | fm
{
"key": "value"
}
```
### Note
If on MacOS, you'll need to codesign the binary file.
```
codesign -s - fm
```