Code Monkey home page Code Monkey logo

json-to-jsonl-cli's Introduction

json-to-jsonl-cli

This package extends the json-to-jsonl package to provide an easy-to-use CLI for its functionality.

Installation

npm install -g github:ThatOneBro/json-to-jsonl-cli.git

Usage

To convert to JSONL from JSON, just use the json2jsonl command from the terminal and target a valid JSON file containing an array of objects. The command uses a relative path from the current directory, as so:

json2jsonl ../path/from/cwd/to/file

or

json2jsonl file

if the file is in the current directory.

The output file will be created with the same filename in the same directory as the specified JSON file, just with the .jsonl file extension.

For example,

json2jsonl bla/bla.json

will create a JSONL file from the specified JSON file called bla.jsonl in the bla directory, where bla.json is located.

Overwriting Existing Files

If you would like to overwrite an existing JSONL file created from one of your JSON files, just add the w+ indicator as an argument, like so:

json2jsonl bla.json w+

This will force the conversion at bla.jsonl even if the file already exists.

json-to-jsonl-cli's People

Contributors

thatonebro avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.