Skip to main content

Convert raw lines to a JSON object.

Project description


This is a simple tool to convert whitespace-separated items on separate lines to a JSON object.


Use PyPI:

$ pip install json_lines_to_object


Just pipe the data in:

$ printf "key1 value1\nkey2 value2\nkey3 value3 value33" | jlto
    "key1": "value1",
    "key2": "value2",
    "key3": "value3 value33"


  • Will ignore newlines.


  • Can be told to skip hash-commented lines.
  • Can be told to automatically add an empty string for a value if there is only one part on the line (causes error by default).
  • Can be told to allow duplicate keys (causes error by default).
  • Can be told to flip the keys and values (the values will be the keys).

See command-line help for more information.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for json-lines-to-object, version 0.2.2
Filename, size & hash File type Python version Upload date
json_lines_to_object-0.2.2.tar.gz (2.7 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page