JSON Feeder ... Error | Request Guidance

First of all i have admit that am novice in using gatling. While i use Gatling to test my scenario, i get the below error:

Select simulation id (default is ‘vertexperformance’). Accepted characters are a-z, A-Z, 0-9, - and _ v7 Select run description (optional) test Exception in thread “main” java.lang.IllegalArgumentException: Root element of JSON feeder file isn’t an array

Please find the code below: ```

import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._
import io.gatling.core.feeder._

class VertexPerformance extends Simulation {
    val jsonFileFeeder = jsonFile("test.json")
    val httpConf = http 
        .acceptHeader("application/xml, text/html, text/plain, application/json, */*")
        .acceptEncodingHeader("gzip, deflate")

    val theCommonHeaders = Map(
        "Accept" -> "application/xml, text/html, text/plain, application/json, */*",
        "Accept-Encoding" -> "gzip, deflate")    

    val scn = scenario("Vertex API Test")
    //    .feed(Feeders.jsonFileFeeder)
            .header(HttpHeaderNames.ContentType, HttpHeaderValues.ApplicationJson)
            .header(HttpHeaderNames.Accept, HttpHeaderValues.ApplicationJson)


Request some advise...

When you get an error like the one below, you can ignore the part asking you to select a simulation id and focus on the rest of the message. This tells you that the Root element of the JSON feeder file is not an array. Take a look at JSON Feeders for an example of valid JSON.

For example you could have a JSON file:

“id”: 123,
“value”: “foo”
“id”: 124,
“value”: “bar”

and then the http body might look like:

.body(StringBody("""{“id”:${id}, “value”: “${value}”}""")).asJSON