org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unexpected end-of-input in VALUE_STRING

Hi Gatling Group

Wanted to ask about how you are meant to pass values in a .json file to a gatling feeder successfully (v 3.0.0)? I’m getting a JSON parse error right now and I suspect it’s because its cutting off the first json element called “data”.

Here is my code:

val partyEventRequestName = "PartyEvent-Request"
val partyEventFeeder = jsonFile("fem/data/partyevents.json").circular
val partyEventScenarioBuilder = scenario("PartyEvent-Scenario").during(InputValues.runDurationSeconds seconds) {

feed(partyEventFeeder)
      .exec(
        http(partyEventRequestName)
          .post(InputValues.partyEventURI)
//          .body(StringBody("""{"data":{"type":"partyEvent","attributes":{"gcisPartyId":null,"actionSuccessful":true,"actionErrors":null,"partyAttributes":{"actionType":"Authenticate"}}}}"""))
          .body(StringBody(""""${data}""")).asJson
          .headers(InputValues.commonHeaders)
          .header("X-REQUEST-ID", "GATLING-" + randomUUID().toString)
          .check(status.is(202))
      )
}

Here is my partyevents.json file (with just one entry in there for now, although I’d like to add more):

[
  {
    "data": {
      "type": "partyEvent",
      "attributes": {
        "gcisPartyId": null,
        "actionSuccessful": true,
        "actionErrors": null,
        "partyAttributes": {
          "actionType": "Authenticate"
        }
      }
    }
  }
]

The gatling debug output shows:

(v 3.0.0)?

From https://groups.google.com/forum/#!forum/gatling:

When asking for help, please first:

  • Check the documentation
  • Provide the version of Gatling you’re using. Prior to posting, check if you’re running an one and upgrading doesn’t fix your problem.
  • Check this Group’s archives, someone might have asked the same question before you

Yes version 3

<gatling.version>3.0.0</gatling.version>
<dependency>
    <groupId>io.gatling.highcharts</groupId>
    <artifactId>gatling-charts-highcharts</artifactId>
    <version>${gatling.version}</version>
</dependency>