CsvJsonConverter
:green_book: Table of Contents
- :green_book: Table of Contents
- :book: csv_json_converter
- Installation
- Usage
- :busts_in_silhouette: Authors
- :handshake: Contributing
- :star:️ Show your support
# :book: csv_json_convert
This gem converts a csv string to json object.
## Installation
Add the following code to you Gemfile
gem 'csv_json_converter'or install the gem on your terminalgem install csv_json_converter### Usagerequirethis gem on the top of your ruby code. #### Covert csv_to_json If you want to convertcsv string, to json you can useto_jsonmethod fromCsvJsonConverter. Let's see how:-
For example
require 'csv_json_converter'
data_csv='file;text;number;hex
test18.csv;CMkABfAGXvmSFV;9892576;jz40cbafbec8d6f92e93d22ea6ef5b'
json_data = CsvJsonCoverter.to_json(data_csv)
print json_data
The output looks like below
{ "file": "test18.csv",
"text": "CMkABfAGXvmSFV",
"number": 9892576,
"hex": "jz40cbafbec8d6f92e93d22ea6ef5b"
}
:busts_in_silhouette: Authors
:bust_in_silhouette: Pablo Zambrano
- GitHub: @alexoid1
- Twitter: @pablo_acz
- LinkedIn: Pablo Alexis Zambrano ## :handshake: Contributing This repo is open for contributions. Issues, and feature requests are welcome! Feel free to check the issues page. ## :star:️ Show your support Give a star if you like this project!