Hello ,

Is there any componenets or developement walk around for converting csv to json format?

Hi Naren,

You can use the Forge component https://www.outsystems.com/forge/component-overview/636/csvutil to convert a CSV to an OutSystems record list, which you then can serialize to a JSON structure.

Regards,

Daniel

Cheers! Daniel

I would like the json to be formatted in the way that it suits json format for jira import.Hope you know the json structure or format for importing it into jira.


Hi Naren,

JIRA has extensive document on how to use their APIs.

The JIRA connector in the Forge does use it, you can look at it for inspiration.

Regards,

Daniel


Hello daniel,


    "tests" : [
        {
            "testKey" : "ABC1234",
            "start" : "2014-08-30T12:19:23+01:00",
            "finish" : "2014-08-30T12:20:01+01:00",
            "comment" : "Error executing step 2!",
            "status" : "FAILED",
            "steps": [
                {
                    "status": "PASSED",
                    "comment": "Step 1: OK"
                },
                {
                    "status": "FAILED",
                    "comment": "Step 2 *Failed* with an unexpected error message",
                    "evidences" : [
                        {
                            "data": "(... base 64 encoded ...)",
                            "filename": "screenshot1.jpg",
                            "contentType": "image/jpeg"
                        }
                    ]
                }
            ]
        }
    ]
}

Need something like in this format to be converted from csv.

Hello Naren, 

As Daniel wrote, have you been able to do the first part, convert from csv to recordlist. 

Regards 

Solution

You can use that sample json to generate the OutSystems structures. Then you also need a structure for your csv as it is flat. Then after reading the csv using csvutil, you can iterate the generated structure and map it on the structure generated from the json sample. You can use OutSystems mapping or a foreach with listappend. The serialise the structure to json.

.

Solution

Thanks for the answer

Further more,Can we download the file in json Format and its contents

Yes you can, in your user interface create a button, where  you have to convert the JSON text with the TextToBinary action from the BinaryData extension, and then use download widget instead of the End node.

On the download widhet you can define the filename and mime-type.

Cheers Daniel

Now i got the extreme knowledge of how to achevie this,appreciated.

One thing struggling me up,i am gonna research a bit and implement and get back to you