Parsing JSON/XML Document
Parsing JSON/XML Document
The JSON Parser by Workato and XML Parser by Workato apps allow you to translate any incoming XML or JSON documents that can be useful in your recipe. This action can be used in various ways, most notably in parsing HTTP actions, and parsing data provided by
JSON vs XML
JSON and XML are formats in which data is represented. To learn more about the difference between JSON and XML, click here.
How to use the action.
1) Insert a Sample Document that mirrors the data tree. This allows workato to understand the structure of your data, and translate them accordingly.
2) Insert the Data itself in the Body field.
Once that is done, all subsequent actions will now have the data pills accordingly. In this example, the Sample document is specifying that a Data is a list Item, that contains the following fields such as Name, Parent, etc.
What could go wrong?
If your JSON Document is not an accurate JSON or XML format, The action will throw an error, and there will be no available output fields on the App Data section.Make sure that the document has a root, that means in JSON, that the entire document is covered within the { and } brackets, and in XML, there is a tag that encompasses the main data.