Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Aymen1
Contributor II
Contributor II

Json Format ( POST/PUT REST API )

Hello team,

I am a beginner with talend and I am looking to do a POST of this Json format

 

{

    "data": [

        {

           "a": 46302,

            "b": 816768,

            "c": "5.000000"

 

    }

      ]

}

How can I have this format with tWriteJsonField component ?? -- my message error : {"code":404,"message":"Json invalide"}

0693p00000AayYbAAJ.png 

In advance, thank you for your answer .

Labels (2)
3 Replies
aminegac
Creator
Creator

I have the solution, with each json extract component write the "json looppath querry" like this "$" and you will access the next element in the tree, ie you will get more details. then at the end, in the component "json extract" same thing but for the fields write the final fields of the json object like this "$ .id" "$ .name" "$ .firstname"

Talend OS 4 yrs / Java 17 Web Dev
Aymen1
Contributor II
Contributor II
Author

0693p00000AbWHoAAN.pngI'm really thankful @amine kacem​ : it seems a good solution .

But i tried the solution in the picture and it works

aminegac
Creator
Creator

@Not defined Not defined​  welcome , i will also try yours ,thanks , i tried it in the past and it did not work because of that tree structue at right ,i did not knew what to put , i will try to do as you did.

Talend OS 4 yrs / Java 17 Web Dev