Passing json number datatypes into dynamic ELFileBody

Hi

I have scenarios that make use of a .csv feeder and inject variables into .json body for POST requests

val scn = scenario(“Baseline”) // Scenario Definition
.during(duration){
feed(feeder)
.exec(http(“Post PDP Single Sku Delivery Promise”)
.post("/api/customerPromises")
.header(“Authorization”, s"Bearer $token")
.header(“Content-Type”, “application/json”)
.body(ElFileBody(“bodies/PDPSingleSku.json”)).asJson)
.pause(2, 5)
}

the .json body makes use of substitution like this

[
{
“dispatchPoint”: “${dispatchPoint}”,

but how would i pass in json number type fields?

I solved it by the way

You just use the same substitution variable

ie.

[
{
“myJsonNumberType”: ${myJsonNumberType}

… i was being confused by the intellij editor which was complaining that it wasn’t valid json