maddyblue / sqlfmt

SQL formatter with width-aware output
https://sqlfum.pt
Apache License 2.0
415 stars 22 forks source link

Formatting JSON string #39

Open erikfroseth opened 5 years ago

erikfroseth commented 5 years ago

Hi,

Do you have any plans on pretty printing JSON values? For example, something like "INSERT INTO my_table (json_col) VALUES ('{ ... a long JSON document ... }');" prints the entire JSON on a single line.

maddyblue commented 5 years ago

No plans to do this. It's hard or impossible to know if a string is actually JSON without having access to the table schema, and a code formatter definitely doesn't.