Incorrect JSON format

Hi,

I’m using ELFileBody to pass dynamic data and had issue with my JSON format

.body(ELFileBody(“test_request_29.txt”)))

test_request_29.txt content:
{“testUids”:[“9d756930-6787-4e7a-993a-93c96a07f274”,“a6a4736d-60ec-4776-8a84-7b68db254887”,“f8051689-f70a-4881-9172-b43cffef80f7”],“countryUids”:[],“startIndex”:0,“pageSize”:100}
This format work correct.

But if I use ${testUids} in test_request_29.txt as below:
{“testUids”:["${testUids}"],“countryUids”:[],“startIndex”:0,“pageSize”:100}

and data feed is:
testUids
“”“9d756930-6787-4e7a-993a-93c96a07f274"”,"“a6a4736d-60ec-4776-8a84-7b68db254887"”,"“f8051689-f70a-4881-9172-b43cffef80f7"”"

Run the scenario failed with error message:
11:34:24.908 [WARN ] i.g.h.a.AsyncHandlerActor - Request ‘Select 1’ failed: status.in(200,304,201,202,203,204,205,206,207,208,209), but actually found 500

What is the correct format for this case?

Please give me your idea.

Thanks in advance.

Interesting…

OpenCSV uses \ as escape character while RFC4180 expects ". Could you use the following while I figure this out, please?

"“9d756930-6787-4e7a-993a-93c96a07f274”,“a6a4736d-60ec-4776-8a84-7b68db254887”,“f8051689-f70a-4881-9172-b43cffef80f7"”

My bad, I checked the code and we do use " as the double quote escaping character.

Your problem is that you have additional “” in your template that shouldn’t be there: write ${testUids} instead of “${testUids}”

Thanks Stéphane,

Removed " and it works now.