
Security News
CISA’s 2025 SBOM Guidance Adds Hashes, Licenses, Tool Metadata, and Context
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
This gem converts a csv string to json object.
Add the following code to you Gemfile
gem 'csv_json_converter'
or install the gem on your terminal
gem install csv_json_converter
require
this gem on the top of your ruby code.
If you want to convert csv string
, to json you can use to_json
method from CsvJsonConverter
. 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"
}
If you want to convert json object
, to json you can use to_csv
method from CsvJsonConverter
. Let's see how:-
For example
require 'csv_json_converter'
data_json={ "file": "test18.csv",
"text": "CMkABfAGXvmSFV",
"number": 9892576,
"hex": "jz40cbafbec8d6f92e93d22ea6ef5b"
}
csv_data = CsvJsonCoverter.to_csv(data_json)
print csv_data
The output looks like below
"file,text,number,hex\ntest18.csv,CMkABfAGXvmSFV,9892576,jz40cbafbec8d6f92e93d22ea6ef5b"
:bust_in_silhouette: Pablo Zambrano
This repo is open for contributions. Issues, and feature requests are welcome! Feel free to check the issues page.
Give a star if you like this project!
FAQs
Unknown package
We found that csv_json_converter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.