
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 06:58 PM
How can I parse YAML files in ServiceNow?
Example
ServiceNow has an integrated JSON parser.
For example, from various posts, I can retrieve a JSON file via REST, then parse it with the JSON object.
var restMessage = new sn_ws.RESTMessageV2('Rest Integration', 'GET'); var response = restMessage.execute(); var responseBody = response.getBody(); var httpStatus = response.getStatusCode(); var parsedData = JSON.parse(responseBody)
What if the "responseBody" is in YAML format? Can I parse it with a similar YAML object?
var restMessage = new sn_ws.RESTMessageV2('Rest Integration', 'GET'); var response = restMessage.execute(); var responseBody = response.getBody(); var httpStatus = response.getStatusCode(); var parsedData = YAML.parse(responseBody)
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 12:50 PM - edited 10-19-2023 12:55 PM
The application YAML JSON Converter in the ServiceNow Store is a solution. This application converts data in YAML format to JSON.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 12:50 PM - edited 10-19-2023 12:55 PM
The application YAML JSON Converter in the ServiceNow Store is a solution. This application converts data in YAML format to JSON.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2025 03:35 AM
Hi I cannot download from servicenow store
can you suggest steps here to download YAML to JSON converter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2025 04:55 PM
Use this, as it also allows for encoding back into YAML.
https://github.com/nodeca/js-yaml
'Install' it as a Script Include. If you're unsure how to load this into SN, ask ChatGPT. And consider the difference of it being loaded globally each time into memory, and on demand (initialise). As it's a large file.