tsv2json

Turn TSV file or stream into JSON file or stream

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version Unknown
License MIT
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:23

Tags

Installation

nimble install tsv2json
choosenim install tsv2json
git clone https://github.com/hectormonacci/tsv2json

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
tsv2json - - - - - - -

Source

Repository https://github.com/hectormonacci/tsv2json
Homepage https://github.com/hectormonacci/tsv2json
Registry Source nimble_official

README

tsv2json

nimble

Turn TSV file or stream into JSON file or stream.

Input file or stream should be UTF-8 if you want a (syntactically correct) JSON file using UTF-8.

The utility is written wholly in Nim and has no external dependencies.

Input file or stream is checked for the presence of double quotes, and turns them into single quotes, so as to not break JSON syntax.

When one TSV record is accidentally split over two or more lines (e.g., because of some field carrying CR/LF characters), tsv2json attempts a restoration of a good record by turning CR or LF characters into a space character.

A reasonably fast and small executable can be made by issuing this compiling command:

nim -f c -d:danger --app:console --opt:speed --passc:-flto tsv2json.nim && strip -s tsv2json && upx --best tsv2json

Examples

Simple conversion using filename as parameter:

tsv2json file.tsv >file.json

Same, but using stdin stream:

tsv2json <file.tsv >file.json

Just read help:

tsv2json -h

Just know the version:

tsv2json -v