JSON variables are initialized as a result of searching a request for user specified criteria. Any pattern appearing within the JSON node would be used to initialize the value of JSON NO variable.

## JSON Parameter Details

In parameter details, user has to fill the parameter options which are listed below.

### Parameter Options

In parameter option, user has following fields which are listed below.

- Parameter name Parameter name is the name of JSON variable being defined. It's a mandatory field. This name must be unique among all parameters in the service. It must start with an alphabet and after alphabet, user can use number and underscore. Maximum length should be of 64 characters.
- Object Path Specify the full path of the node which value user needs to fetch. For example, in below JSON, user needs to get the value of node email then JSON Node Path should be " root.email ".
  Note : JSON path should start with "root.".
- Occurrence Count (ORD) It is required if multiple occurrence found of specified node. User has three options for this.
  1. Index : By selecting this user can define which index of occurrence need to pick. In index, the values start with 1.
  2. All : If user selects this option then system takes all occurrence of the specified node.
  3. Any : It takes randomly any one occurrence out of all.

### Offset Options

In offset option, the user has the following fields which are listed below:

- Start Offset : This option is used to indicate the starting of the offset. By default, it is set to 0.
  Note : If the user wants the set the offset to be set from the beginning, then the user has to click on the From the Beginning checkbox.
- Maximum Length : This option is used to indicate the maximum length of the offset. By default, it is set to 0.
  Note : If the user wants the maximum length to be the end, then they have to click on the Till the End checkbox.
- Conversion : This option is used to encode search pattern. It has following options which are listed below:
  1. None : In this option, no encoding is applied.
  2. HtmlToUrl : It converts HTML-encoded data to a URL-encoded data.
  3. HtmlToText : It converts HTML-encoded data to plain text format.
  4. TextToUrl : It converts TEXT-encoded data to URL format.
  5. UrlToText : It converts URL-encoded data to plain text format.
  6. UrlToHtml : It converts URL-encoded data to HTML text format.
  7. TextToHtml : It converts Text data to HTML text format.
  8. TextToBase64 : It converts Text data to Base64 format.
  9. Base64ToText : It converts Base64 data to Text format.

### Encoding Options

This field is used to encode special characters. In Encoding Options, there are following options:

- Encode
  1. Encode all special character except (+), (-), (.) and (_).
  2. Encode only special character.
  3. Do not encode special character.
- Character to Encode
  1. This option will only be enable in case of Encode only Specified Character option.
  2. In this filed, the user has to provide the character to be encoded.
- Encode Space by
  1. This option will only be enable in case of Encode all special character except (+), (-), (.),(_) and Encode only Specified Character option.
  2. In this field, it has following 2 options:
     - +
     - %20

Note : After the user has filled up all the fields, the user can add the parameter details by clicking on the ADD button. A user can also reset the window by clicking on the RESET button.

### Sample Request

In Sample Request, the user has to provide the template name along with the type of beatification option they require. A user has to specify the below given two fields in order to send a sample request :

- Sample Request for Template Name : In this field, the user has to provide the template and its name for sample request.
- Beautify : In this field, the user has to select the type of request format or beautify option. The user can choose the beautify options from the below given list in the drop-down:
  1. JSON
  2. TEXT
  3. CSS
  4. HTML
  5. JavaScript
  6. XML

Note : If a user wants to directly add an Object Path from the sample request, they can add the request in the Sample Request Template Name, choose the beautify option and the click on the Set JSON Node Path button.