JSON parser component and schema validation
Use the JSONParser component in Pega Robot Studio to parse and manage JSON-style data within your automation projects. This component's methods facilitate the conversion of JSON data into .NET-style data, enabling you to read, iterate, and utilize it effectively in your automation.
For example, a robotic development team creates a robotic project for a telecommunications provider to collect customer data regarding network outages reported through an online form. This form saves the data in a JSON file, which the company needs to parse and analyze for statistical purposes. Using the JSONParser component, the company can read and process the data according to its requirements with a robotic automation.
To use the JSONParser component in your project, add it on the Globals tab in the Data handling section of the Toolbox, as shown in the following figure:
JSON Schema Validator
Before working with JSON files in Pega Robot Studio, you must generate a JSON Schema. You can create the schema manually or use a service that generates it based on sample data. Once your schema is ready, use the JSON Schema validator to verify the example JSON data against the prepared schema.
For more information about generating JSON Schema and accessing JSON Schema validator, see: Adding a JSON parser component
In the following image, click the + icons to learn more about validating JSON schema:
After completing the schema validation process, you can create proxies to access data for your automations. For more information on the various methods of handling data with the JSON component, see Working with the JSON Parser component on the Pega Documentation site.
Check your knowledge with the following interaction:
This Topic is available in the following Module:
Want to help us improve this content?