Importing collections and indentation

Im creating a script that generates postman collections in JSON, using the postman-collection npm package.

All is good, except that my JSON body does not have any indentation and shows the entire body on a single line in Postman. As far as the difference with and export from Postman itself:

  • Postman exports the body with \r\n at the start of each ‘{’ tag
  • My collection uses LF as the end of line sequence (also tried CR LF but this didnt matter)

How can I create a ‘beautified’ Postman body in my own collections? And why does Postman not automatically do this?

Added \r\n after each ‘{’ is a last resort option but I prefer to keep the JSON from my collection generator simple