Skip to main content

Parsing and access of JSON data in robotic automation

Once you have created and validated the JSON schema, you can parse and access the data within your automation. You do this by using the ParseFile method of the JSONParser component, and then extract the base proxy. Parsing the JSON file converts it into a .NET object, while the base proxy enables you to access its elements through the Select action window. For detailed steps on creating a base proxy, see Creating a proxy from a JSON file on the Pega Documentation site.

Note: Move the base proxy to the Globals section for use across different automations in the project.

Creating proxy for selected items

To access elements within a nested data structure in a JSON file, you must create an additional proxy. For example, a telecommunications provider prepares incident reports for specific customers. Each customer has a nested structure of assigned claims, as shown in the following figure: 

An example JSON file containing customers and nested claims.

To access the nested structure, you need to create a proxy for the customers based on the customer ID. The proxy enables you to loop through the embedded data, as shown in the following figure: 

An example automation presenting extracting proxies from nested data and looping through .NET object elements.

For more information on creating a proxy for embedded arrays, see Creating a proxy from selected items on the Pega Documentation site.

Check your knowledge with the following interaction: 

 

 

 


This Topic is available in the following Module:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice