sqlfmt icon indicating copy to clipboard operation
sqlfmt copied to clipboard

Formatting JSON string

Open erikfroseth opened this issue 7 years ago • 1 comments

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.

erikfroseth avatar Nov 07 '18 11:11 erikfroseth

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.

madelynnblue avatar Nov 07 '18 17:11 madelynnblue