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. Items with an asterisk * are required.
- 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.
Receiver Attribute Property Keys
The Receiver defines three property keys that can be modified on any of its associated Domain Attributes:
- columnName - Defines the column name as it will be output in the delimited file header.
- include - Determines if the Attribute will be included as a column in the output.
- useQuotes - Determines if a value should be quoted. Sometimes a numeric value should be quoted (e.g. SSN).
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" } ] }