1

I'm trying to transform Talend jobs to Spring Boot REST services. But I can't figure out the body of this post request.

Job 1 picture illustrates a JSON extract, and subjob picture is other in loop JSON extract, so I suppose the expected JSON is something like this:

{
    "user": "alvaro",
    "flight": [
        {
            "flightUID": "1",
            "infoSusp": "xx",
            "medSusp": "otr aprueba"
        },
            {
            "flightUID": "2",
            "infoSusp": "xx",
            "medSusp": "otr aprueba"
        }
    ]
}

But I always receive bad request response.

Job 1:

enter image description here

Subjob 2:

enter image description here

andrewJames
  • 19,570
  • 8
  • 19
  • 51
  • I don't know the particular program that you're using. Is it aware that `flight` is an array of objects and not just an object with properties? Because `[{foo:bar}]` isn't the same as `{foo:bar}` – Dasph Sep 01 '22 at 12:41
  • If I understand correctly, you want to know what is the structure of your json input in tFixedFlow_1 ? Then just put a tLogRow after this component to print the json content, and make sure it is the structure you are looking for – Corentin Sep 02 '22 at 07:33
  • I solved it. Flgiht wasn´t an array. Loop XPath query is for iterate over the flight fields, not over flights – Álvaro Abad de Donesteve Sep 07 '22 at 09:55

0 Answers0