Description

The JSONFileReceiver receives data from a given GenRocket Domain and writes the data out to a file in JSON format. Note, this particular JSON Receiver does not allow for nested elements.


Parameters

The JSONFileReceiver requires that the following parameters are defined:

  • path - Defines the location to store the newly generated JSON output file.
  • fileName - Defines the name of the output file.
  • rootElementName - Defines the root element of the JSON structure.


Example Output

The following is an example JSON output of a User Domain.


{
  "users" : [
    {
      "id" : "1",
      "firstName" : "Alexa",
      "lastName" : "Topete",
      "middleInitial" : "G",
      "username" : "user1",
      "password" : "C4CA4238A0B923820DCC509A6F75849B",
      "phoneNumber" : "(308) 575-6657"
    },
    {
      "id" : "2",
      "firstName" : "Sibyl",
      "lastName" : "Epstein",
      "middleInitial" : "T",
      "username" : "user2",
      "password" : "C81E728D9D4C2F636F067F89CC14862C",
      "phoneNumber" : "(739) 798-3806"
    },
    {
      "id" : "3",
      "firstName" : "Norman",
      "lastName" : "Marini",
      "middleInitial" : "P",
      "username" : "user3",
      "password" : "ECCBC87E4B5CE2FE28308FD9F2A7BAF3",
      "phoneNumber" : "(616) 545-8376"
    }
  ]
}