Beautify
Last updated
Last updated
This is pre-built Action located under the @Generic Element Name. It instructs the Avo Assure Client to Beautify the content, means it will fix the alignment of file or Input text of provided file and save the result in the given output variable.
Input: <Filepath/Input Text>; <xml/json>
Output: <Dynamic Variable>;<Dynamic Variable>(Optional)
When you are testing an e-commerce platform that has a RESTful API for managing products. When you send a request to retrieve product details, the API returns a JSON response that may be difficult to read in its raw format.
API Request: You make a GET request to the endpoint /api/products/123, which returns the following raw JSON response:
{"id":123,"name":"Laptop","price":999.99,"inStock":true}
Expected Result: The “Beautify” action needs to set the alignment of the provided file as shown below and save the result in output variable.
Resulting beautified Json file:
{"id": 123,
"name": "Laptop",
"price": 999.99,
"inStock": true}
Output: The resulting beautified content is stored in the {result} output variable, which can be utilized for display or other purposes.