cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ericonline
Community Champion
Community Champion

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
v-bacao-msft
Community Support
Community Support

 

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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (1,160)