šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

com.github.ramalapure:json-parser

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.github.ramalapure:json-parser

The library performs an operation on JSON and returns CSV data in the following output formats: String, File, and Writer.

1.1
Source
Maven
Version published
Maintainers
1
Source

The library perform operation on json and returns csv data in multiple output formats:

  • String
  • File
  • Writer

How you can use it:

Maven Central

Maven

<dependency>
  <groupId>com.github.ramalapure</groupId>
  <artifactId>json-parser</artifactId>
  <version>1.1</version>
</dependency>

Gradle

implementation 'com.github.ramalapure:json-parser:1.1'

To parse json input string to csv, you can do it by following ways:

Note: The following default separator "_" and delimiter "," are used while creating CSV.
Also there is an alternative to pass custom separator (e.g. "/") and delimiter(e.g. "|").

  • Output as String

    JsonParser.parse2Csv(INPUT_JSON_STRING); 
    // or
    JsonParser.parse2Csv(INPUT_JSON_STRING, CUSTOM_SEPARATOR, CUSTOM_DELIMITER);
    
  • Output as Writer

    JsonParser.parse2Csv(INPUT_JSON_STRING, WRITER_OBJECT); //e.g. StringWriter, FileWriter, etc.
    // or
    JsonParser.parse2Csv(INPUT_JSON_STRING, WRITER_OBJECT, CUSTOM_SEPARATOR, CUSTOM_DELIMITER);
    
  • Output as File

    JsonParser.parse2Csv(INPUT_JSON_STRING, CSV_FILE_PATH); // CSV_FILE_PATH e.g. test.csv or D://somefolder/test.csv or /home/user/downloads/test.csv
    // or
    JsonParser.parse2Csv(INPUT_JSON_STRING, CSV_FILE_PATH, CUSTOM_SEPARATOR, CUSTOM_DELIMITER);
    

FAQs

Package last updated on 04 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts