printers CHANGE unify formatting options for data and schema printers
Replaces LYD_PRINT_FORMAT by the LYD_PRINT_SHRINK with the inverse
meaning. This way the default formating (do format output) is unified
between data and schema printers. The commit also introduces
LYS_PRINT_SHRINK with the same value to have the option explicitely also
for the schema printers and to allow to print schemas without
unnecessary indentations and new lines.
diff --git a/src/printer_json.c b/src/printer_json.c
index 3119853..2a8a876 100644
--- a/src/printer_json.c
+++ b/src/printer_json.c
@@ -859,7 +859,7 @@
{
const struct lyd_node *node;
struct jsonpr_ctx ctx = {0};
- const char *delimiter = (options & LYD_PRINT_FORMAT) ? "\n" : "";
+ const char *delimiter = (options & LYD_PRINT_SHRINK) ? "" : "\n";
if (!root) {
ly_print_(out, "{}%s", delimiter);