Overview
This is a simple tool to convert whitespace-separated items on separate lines to a JSON object.
Install
Use PyPI:
$ pip install json_lines_to_object
Example
Just pipe the data in:
$ printf "key1 value1\nkey2 value2\nkey3 value3 value33" | jlto
{
"key1": "value1",
"key2": "value2",
"key3": "value3 value33"
}
Features
Will ignore newlines.
Options
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.
Metadata
Release files for json-lines-to-object 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| json_lines_to_object-0.2.2.tar.gz | 2.7 kB | Without provenance | Details for json_lines_to_object-0.2.2.tar.gz |
Release files / json_lines_to_object-0.2.2.tar.gz
| Download URL | json_lines_to_object-0.2.2.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
14aabe6698a4623c39d3e5e752c108638bd513d302587934445b1048b2c85b4f
|
|
BLAKE2b-256 checksum How to use checksums |
7ac1cd1bce6c00fbb875de72720c8ffc29fb7286fb3201371f08212305fe2411
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for json-lines-to-object 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.