Home > Software design >  how to format a code that comes from json
how to format a code that comes from json

Time:07-19

I have json that contains object with code.

Data with the code i accept in inline style.

And if i want to show this code it will be in inline style and its unreadable.

*I use SyntaxHighlighter to show my code

How can i format a code that comes from json? Maybe you know API or npm package?

JSON structure

my code in the website

example the code thas was formated

CodePudding user response:

if you use vscode,vscode can do it,vscode has default prettier for json(JSON Language features) enter image description here

CodePudding user response:

Are you searching something like this?

  • Related