You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

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.


Version published
Maintainers
1

Readme

Source

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

  1. String
  2. File
  3. 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. "|").

  1. Output as String

    JsonParser.parse2Csv(INPUT_JSON_STRING); 
    // or
    JsonParser.parse2Csv(INPUT_JSON_STRING, CUSTOM_SEPARATOR, CUSTOM_DELIMITER);
    
  2. 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);
    
  3. 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc