Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
When saving as a pbip and opening report.json with vscode, it has a long line of code at the top and throughout the code for the "config" key items. Is there a way to make these split onto multiple lines for readability?
Solved! Go to Solution.
Hi @vfx661 ,Hello @RossEdwards ,Thank you for your prompt reply!
We could also convert an escaped JSON string to a standard format in Visual Studio Code, you can follow the steps below:
const escapedJsonString = "{\"name\":\"2816855a60051136b63a\",\"layouts\":[{\"id\":0,\"position\":{\"x\":20.6873,\"y\":330.27,\"z\":7000.00}}]}";
const jsonObject = JSON.parse(escapedJsonString);
const standardJsonString = JSON.stringify(jsonObject, null, 2);
console.log(standardJsonString);
node c:\Users\Administrator1\Desktop\formatJson.js
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @vfx661 ,Hello @RossEdwards ,Thank you for your prompt reply!
We could also convert an escaped JSON string to a standard format in Visual Studio Code, you can follow the steps below:
const escapedJsonString = "{\"name\":\"2816855a60051136b63a\",\"layouts\":[{\"id\":0,\"position\":{\"x\":20.6873,\"y\":330.27,\"z\":7000.00}}]}";
const jsonObject = JSON.parse(escapedJsonString);
const standardJsonString = JSON.stringify(jsonObject, null, 2);
console.log(standardJsonString);
node c:\Users\Administrator1\Desktop\formatJson.js
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks @Anonymous that's given me a great idea - your solution works fine - just wanted something faster. I've got python/R, so load up a json parsing library and create a function that converts to pretty format without saving and running files.
I've also discovered PBIR format option - that's what I really want to use - if only it published at a button press instead of forcing me to use fabric git integration 👹
Have you tried copying and paste the code into a JSON formatter tool online? Thats generally what I do when i'm trying to read the JSON outputs.
User | Count |
---|---|
85 | |
73 | |
73 | |
57 | |
51 |
User | Count |
---|---|
43 | |
41 | |
35 | |
34 | |
30 |