CSV to JSON converter Applications.

Hello Experts,
Any safe Windows application or plugin to convert a CSV file to JSON. Please note I cannot use solutions online as I am handling confidential data and cannot upload it. Appreciate any suggestions.
sukhoi35Asked:
Who is Participating?
 
Dirk StraussSenior Full Stack DeveloperCommented:
I would create the tool entirely in C#. Grab the CSV and match it to an object that you create. You can then use a NuGet package called Newtonsoft.Json to create a JSON string from that object. Have a look at my second answer here: JSON object to C#.
0
 
käµfm³d 👽Commented:
If you know C#, then why don't you just use TextFieldParser and Json.NET?
0
 
Pawan KumarDatabase ExpertCommented:
The best approach would be save the CSV data into the database and generate JSON from there. Which DB are you using?
If you are using SQL Server 2016+ it is very easy. check below-

select * from
(
      SELECT *,
            LEFT(your_column, PATINDEX('%[^0-9]%', your_column + '.') - 1) AS [leading_digit(s)]
      FROM
      (VALUES('1 - Snoopy'),('2 - Marmadook'),('3 - Fido'),('14 - Kujo'),
      ('5Lassie'),('6    Rin Tin Tin'),('7(Spiderman)'),('#'),('8'),('33'),('777')) AS data(your_column)
)o
FOR JSON PATH , ROOT('leading_digit(s)')

Even if you are using old DB you can write an SP and create logic there.
0
 
sukhoi35Author Commented:
Thank you for helping!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.