cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

Prettify JSON?

Hello, need some help on this one...

  • Have a JSON file that is "serialized" meaning, 1 long string.
  • Want to "prettify it" meaning, to format it correctly with indents, etc.
  • With the help of others, I created an Azure Function that uses PowerShell to prettify.
  • The response from the Azure Function is indeed formatted correctly.
  • BUT... the Create a File action for OneDrive For Business converts the JSON back to a serial string!

How can I prettify JSON in Flow OR leave formatted JSON as formatted JSON when creating a file? 

Example:

  1. Flow overview
    1. image.png
  2. Original file, serialized JSON
    1. image.png
  3. Response from Azure Function (pretty)
    1. image.png
  4. Re-created file, back to serialized JSON
    1. image.png
1 REPLY 1
Community Support Team
Community Support Team

Re: Prettify JSON?

 

Hi @ericonline ,

 

I am afraid that the format you expect cannot be modified by Flow.

Since its file type is already .json, it will not affect subsequent use.

Please consider adding some extensions in Visual Studio Code to automatically decorate json data into the expected format.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,394)