kibana2json
Version, currently master branch1 version
- master branchlatestApr 29, 2021
github.com/spinscale/kibana2json
CLI tool to convert JSON copied from the kibana console back to valid JSON
Installation
# Add this to your shard.yml
dependencies:
kibana2json:
github: spinscale/kibana2json
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.31.0- License
- MIT
- Author
- Alexander Reelsen
- Target
kibana2jsonfrom src/kibana2json.cr
Dependencies
This version declares no dependencies.
README
kibana2json
A simple helper to reformat JSON pasted from Kibana that uses the famous triple ticks (""") and thus has multi line scripts and broken search queries back to valid JSON.
This helps to run jq or JSON formatting tools on the command line against those JSON files.
The tool checks for beginning and end of triple double quotes, escapes all double quotes within and also condenses everything down to one line (this might result in invalid painless scripts, but keeps valid JSON).
Installation
First, make sure you have crystal installed. See the crystal install docs.
Second, run crystal build --release src/kibana2json.cr and use the kibana2json binary created in the directory. Alternatively you can run shards build --production --release
Usage
kibana2json reads from stdin only. The only options available are --version and --help.
I usually use it like this
# echo '{ "foo" : """what"ever""" }' | ./kibana2json | python -mjson.tool
or with JQ
echo '{ "foo" : """what"ever""" }' | ./kibana2json | jq ".foo"
Development
Most likely you found a bug in this pretty raw tool.
In that case please write a failing test in spec/json_parser_spec.cr, fix it and open a pull request. Alternatively open an issue with a sample snippet of JSON and I'll take a look at it when possible.
You can run the tests locally by running crystal spec.
Contributing
- Fork it (https://github.com/your-github-user/kibana2json/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- spinscale Alexander Reelsen - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Apr 29, 2021
- Crystal
0.31.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/spinscale/kibana2json
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 14, 2026
- Synced
- Aug 14, 2026
- Versions
- 1