Hi,
it is possible to convert a csv file to json file?

I want to stream json files and output the data as it comes in from the files. So my files are "csv" type and I want to convert these files to "json" type.


I can read csv file as follows:

ClassMethod ReadFile()
{
    set stream = ##class(%Stream.FileCharacter).%New()
    set sc = stream.LinkToFile("*.csv")
    do stream.Rewind()
    while'stream.AtEnd {
        set line=stream.ReadLine()
        write line,!
}

What should I add to convert it to "json" and read it again?

Thank you

Last answer 6 July 2018 Last comment 14 September 2018
0   1 5
496

views

0

rating

Hello everyone,
I just started to learn how to create a web application. My aim is to create a web app with IRIS, which streams financial data.
Can I connect some streaming-data API (for example IEX API) with the IRIS Platform? Or is there any other easier way to achieve my aim?
Thank you in advance.

Last answer 26 June 2018 Last comment 27 June 2018
+ 1   0 3
132

views

+ 1

rating