JSON to YAML conversion

I have a json file and I want to convert it to yaml in Postman or will I have to use other tools to do that? Basically, I want to generate API Definitions of existing code files and I want to do that using Postman instead of going to some other software like Swagger.

Postman is built on Node.JS and the pre-request scripts and tests tab support JavaScript but you are limited to the libraries that are included in the sandbox.

The following link details what libraries are available.

Manage API data and workflows using Postman JavaScript objects | Postman Learning Center

The following blog explains how you can use external libraries using the JavaScript Eval function.

Adding External Libraries in Postman | Postman Blog

The Eval function will only work with simple libraries that can run completely from the minified.js (and buyers beware as using Eval is a bit of a security risk, you need to ensure that the JavaScript you are evaluating is secure and tamper proof). Having a quick look, the only libraries that I could find for converting JSON to YAML were node.js libraries so Iā€™m not sure you will find one than can run standalone.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.