diff --git a/src/printer_json.c b/src/printer_json.c
index 79824a1..0e0349f 100644
--- a/src/printer_json.c
+++ b/src/printer_json.c
@@ -51,7 +51,7 @@
 
 #define PRINT_COMMA \
     if (ctx->level_printed >= ctx->level) {\
-        ly_print(ctx->out, ",%s", (DO_FORMAT ? "\n" : ""));\
+        ly_print_(ctx->out, ",%s", (DO_FORMAT ? "\n" : ""));\
     }
 
 static LY_ERR json_print_node(struct jsonpr_ctx *ctx, const struct lyd_node *node);
@@ -96,7 +96,7 @@
 json_print_array_open(struct jsonpr_ctx *ctx, const struct lyd_node *node)
 {
     /* leaf-list's content is always printed on a single line */
-    ly_print(ctx->out, "[%s", (!node->schema || node->schema->nodetype != LYS_LEAFLIST) && DO_FORMAT ? "\n" : "");
+    ly_print_(ctx->out, "[%s", (!node->schema || node->schema->nodetype != LYS_LEAFLIST) && DO_FORMAT ? "\n" : "");
     ly_set_add(&ctx->open, (void*)node, 0);
     LEVEL_INC;
 }
@@ -133,9 +133,9 @@
     ly_set_rm_index(&ctx->open, ctx->open.count - 1, NULL);
     if (schema && schema->nodetype == LYS_LEAFLIST) {
         /* leaf-list's content is always printed on a single line */
-        ly_print(ctx->out, "]");
+        ly_print_(ctx->out, "]");
     } else {
-        ly_print(ctx->out, "%s%*s]", DO_FORMAT ? "\n" : "", INDENT);
+        ly_print_(ctx->out, "%s%*s]", DO_FORMAT ? "\n" : "", INDENT);
     }
 }
 
@@ -214,40 +214,40 @@
  *
  * @param[in] out The output handler.
  * @param[in] text The string to print.
- * @return The number of printed characters.
+ * @return LY_ERR value.
  */
-static int
+static LY_ERR
 json_print_string(struct ly_out *out, const char *text)
 {
     unsigned int i, n;
 
     if (!text) {
-        return 0;
+        return LY_SUCCESS;
     }
 
-    ly_write(out, "\"", 1);
+    ly_write_(out, "\"", 1);
     for (i = n = 0; text[i]; i++) {
         const unsigned char ascii = text[i];
         if (ascii < 0x20) {
             /* control character */
-            n += ly_print(out, "\\u%.4X", ascii);
+            ly_print_(out, "\\u%.4X", ascii);
         } else {
             switch (ascii) {
             case '"':
-                n += ly_print(out, "\\\"");
+                ly_print_(out, "\\\"");
                 break;
             case '\\':
-                n += ly_print(out, "\\\\");
+                ly_print_(out, "\\\\");
                 break;
             default:
-                ly_write(out, &text[i], 1);
+                ly_write_(out, &text[i], 1);
                 n++;
             }
         }
     }
-    ly_write(out, "\"", 1);
+    ly_write_(out, "\"", 1);
 
-    return n + 2;
+    return LY_SUCCESS;
 }
 
 /**
@@ -264,10 +264,10 @@
     PRINT_COMMA;
     if (LEVEL == 1 || json_nscmp(node, (const struct lyd_node*)node->parent)) {
         /* print "namespace" */
-        ly_print(ctx->out, "%*s\"%s%s:%s\":%s", INDENT, is_attr ? "@" : "",
+        ly_print_(ctx->out, "%*s\"%s%s:%s\":%s", INDENT, is_attr ? "@" : "",
                  node_prefix(node), node->schema->name, DO_FORMAT ? " " : "");
     } else {
-        ly_print(ctx->out, "%*s\"%s%s\":%s", INDENT, is_attr ? "@" : "",
+        ly_print_(ctx->out, "%*s\"%s%s\":%s", INDENT, is_attr ? "@" : "",
                  node->schema->name, DO_FORMAT ? " " : "");
     }
 
@@ -315,9 +315,9 @@
 
     /* print the member */
     if (module_name && (!parent || node_prefix(parent) != module_name)) {
-        ly_print(ctx->out, "%*s\"%s%s:%s\":%s", INDENT, is_attr ? "@" : "", module_name, name, DO_FORMAT ? " " : "");
+        ly_print_(ctx->out, "%*s\"%s%s:%s\":%s", INDENT, is_attr ? "@" : "", module_name, name, DO_FORMAT ? " " : "");
     } else {
-        ly_print(ctx->out, "%*s\"%s%s\":%s", INDENT, is_attr ? "@" : "", name, DO_FORMAT ? " " : "");
+        ly_print_(ctx->out, "%*s\"%s%s\":%s", INDENT, is_attr ? "@" : "", name, DO_FORMAT ? " " : "");
     }
 
     return LY_SUCCESS;
@@ -357,11 +357,11 @@
     case LY_TYPE_UINT16:
     case LY_TYPE_UINT32:
     case LY_TYPE_BOOL:
-        ly_print(ctx->out, "%s", value[0] ? value : "null");
+        ly_print_(ctx->out, "%s", value[0] ? value : "null");
         break;
 
     case LY_TYPE_EMPTY:
-        ly_print(ctx->out, "[null]");
+        ly_print_(ctx->out, "[null]");
         break;
 
     default:
@@ -390,7 +390,7 @@
     struct lyd_attr *attr;
 
     if (wdmod) {
-        ly_print(ctx->out, "%*s\"%s:default\":\"true\"", INDENT, wdmod->name);
+        ly_print_(ctx->out, "%*s\"%s:default\":\"true\"", INDENT, wdmod->name);
         LEVEL_PRINTED;
     }
 
@@ -399,9 +399,9 @@
         json_print_member2(ctx, (struct lyd_node*)node, attr->format, &attr->prefix, attr->name, 0);
 
         if (attr->hint & (LYD_NODE_OPAQ_ISBOOLEAN | LYD_NODE_OPAQ_ISNUMBER)) {
-            ly_print(ctx->out, "%s", attr->value[0] ? attr->value : "null");
+            ly_print_(ctx->out, "%s", attr->value[0] ? attr->value : "null");
         } else if (attr->hint & LYD_NODE_OPAQ_ISEMPTY) {
-            ly_print(ctx->out, "[null]");
+            ly_print_(ctx->out, "[null]");
         } else {
             json_print_string(ctx->out, attr->value);
         }
@@ -425,13 +425,13 @@
     struct lyd_meta *meta;
 
     if (wdmod) {
-        ly_print(ctx->out, "%*s\"%s:default\":\"true\"", INDENT, wdmod->name);
+        ly_print_(ctx->out, "%*s\"%s:default\":\"true\"", INDENT, wdmod->name);
         LEVEL_PRINTED;
     }
 
     for (meta = node->meta; meta; meta = meta->next) {
         PRINT_COMMA;
-        ly_print(ctx->out, "%*s\"%s:%s\":%s", INDENT, meta->annotation->module->name, meta->name, DO_FORMAT ? " " : "");
+        ly_print_(ctx->out, "%*s\"%s:%s\":%s", INDENT, meta->annotation->module->name, meta->name, DO_FORMAT ? " " : "");
         LY_CHECK_RET(json_print_value(ctx, &meta->value));
         LEVEL_PRINTED;
     }
@@ -464,11 +464,11 @@
         } else {
             LY_CHECK_RET(json_print_member(ctx, node, 1));
         }
-        ly_print(ctx->out, "{%s", (DO_FORMAT ? "\n" : ""));
+        ly_print_(ctx->out, "{%s", (DO_FORMAT ? "\n" : ""));
         LEVEL_INC;
         LY_CHECK_RET(json_print_metadata(ctx, node, wdmod));
         LEVEL_DEC;
-        ly_print(ctx->out, "%s%*s}", DO_FORMAT ? "\n" : "", INDENT);
+        ly_print_(ctx->out, "%s%*s}", DO_FORMAT ? "\n" : "", INDENT);
         LEVEL_PRINTED;
     } else if (!node->schema && ((struct lyd_node_opaq*)node)->attr) {
         if (inner) {
@@ -477,11 +477,11 @@
             LY_CHECK_RET(json_print_member2(ctx, node, ((struct lyd_node_opaq*)node)->format,
                                             &((struct lyd_node_opaq*)node)->prefix, ((struct lyd_node_opaq*)node)->name, 1));
         }
-        ly_print(ctx->out, "{%s", (DO_FORMAT ? "\n" : ""));
+        ly_print_(ctx->out, "{%s", (DO_FORMAT ? "\n" : ""));
         LEVEL_INC;
         LY_CHECK_RET(json_print_attribute(ctx, (struct lyd_node_opaq*)node, wdmod));
         LEVEL_DEC;
-        ly_print(ctx->out, "%s%*s}", DO_FORMAT ? "\n" : "", INDENT);
+        ly_print_(ctx->out, "%s%*s}", DO_FORMAT ? "\n" : "", INDENT);
         LEVEL_PRINTED;
     }
 
@@ -563,7 +563,7 @@
         if (!any->value.str[0]) {
             return LY_SUCCESS;
         }
-        ly_print(ctx->out, "%*s%s", INDENT, any->value.str);
+        ly_print_(ctx->out, "%*s%s", INDENT, any->value.str);
         break;
     case LYD_ANYDATA_STRING:
     case LYD_ANYDATA_XML:
@@ -598,10 +598,10 @@
     }
 
     if (!node->schema || node->schema->nodetype != LYS_LIST) {
-        ly_print(ctx->out, "%s{%s", (is_open_array(ctx, node) && ctx->level_printed >= ctx->level) ? "," : "",
+        ly_print_(ctx->out, "%s{%s", (is_open_array(ctx, node) && ctx->level_printed >= ctx->level) ? "," : "",
                  (DO_FORMAT && has_content) ? "\n" : "");
     } else {
-        ly_print(ctx->out, "%s%*s{%s", (is_open_array(ctx, node) && ctx->level_printed >= ctx->level) ? "," : "",
+        ly_print_(ctx->out, "%s%*s{%s", (is_open_array(ctx, node) && ctx->level_printed >= ctx->level) ? "," : "",
                  INDENT, (DO_FORMAT && has_content) ? "\n" : "");
     }
     LEVEL_INC;
@@ -621,9 +621,9 @@
 
     LEVEL_DEC;
     if (DO_FORMAT && has_content) {
-        ly_print(ctx->out, "\n%*s}", INDENT);
+        ly_print_(ctx->out, "\n%*s}", INDENT);
     } else {
-        ly_print(ctx->out, "}");
+        ly_print_(ctx->out, "}");
     }
     LEVEL_PRINTED;
 
@@ -664,13 +664,13 @@
         LY_CHECK_RET(json_print_member(ctx, node, 0));
         json_print_array_open(ctx, node);
     } else if (node->schema->nodetype == LYS_LEAFLIST) {
-        ly_print(ctx->out, ",");
+        ly_print_(ctx->out, ",");
     }
 
     if (node->schema->nodetype == LYS_LIST) {
         if (!lyd_node_children(node, 0)) {
             /* empty, e.g. in case of filter */
-            ly_print(ctx->out, "%s%snull", (ctx->level_printed >= ctx->level) ? "," : "", DO_FORMAT ? " " : "");
+            ly_print_(ctx->out, "%s%snull", (ctx->level_printed >= ctx->level) ? "," : "", DO_FORMAT ? " " : "");
             LEVEL_PRINTED;
         } else {
             /* print list's content */
@@ -715,18 +715,18 @@
     /* node is the first instance of the leaf-list */
 
     LY_CHECK_RET(json_print_member(ctx, node, 1));
-    ly_print(ctx->out, "[%s", (DO_FORMAT ? "\n" : ""));
+    ly_print_(ctx->out, "[%s", (DO_FORMAT ? "\n" : ""));
     LEVEL_INC;
     LY_LIST_FOR(node, iter) {
         PRINT_COMMA;
         if (iter->meta) {
-            ly_print(ctx->out, "%*s%s", INDENT, DO_FORMAT ? "{\n" : "{");
+            ly_print_(ctx->out, "%*s%s", INDENT, DO_FORMAT ? "{\n" : "{");
             LEVEL_INC;
             LY_CHECK_RET(json_print_metadata(ctx, iter, NULL));
             LEVEL_DEC;
-            ly_print(ctx->out, "%s%*s}", DO_FORMAT ? "\n" : "", INDENT);
+            ly_print_(ctx->out, "%s%*s}", DO_FORMAT ? "\n" : "", INDENT);
         } else {
-            ly_print(ctx->out, "null");
+            ly_print_(ctx->out, "null");
         }
         LEVEL_PRINTED;
         if (!matching_node(iter, iter->next)) {
@@ -734,7 +734,7 @@
         }
     }
     LEVEL_DEC;
-    ly_print(ctx->out, "%s%*s]", DO_FORMAT ? "\n" : "", INDENT);
+    ly_print_(ctx->out, "%s%*s]", DO_FORMAT ? "\n" : "", INDENT);
     LEVEL_PRINTED;
 
     return LY_SUCCESS;
@@ -776,12 +776,12 @@
         LEVEL_PRINTED;
     } else {
         if (node->hint & LYD_VALUE_PARSE_ISEMPTY) {
-            ly_print(ctx->out, "[null]");
+            ly_print_(ctx->out, "[null]");
         } else if (node->hint & (LYD_VALUE_PARSE_ISBOOLEAN | LYD_VALUE_PARSE_ISNUMBER)) {
-            ly_print(ctx->out, "%s", node->value);
+            ly_print_(ctx->out, "%s", node->value);
         } else {
             /* string */
-            ly_print(ctx->out, "\"%s\"", node->value);
+            ly_print_(ctx->out, "\"%s\"", node->value);
         }
         LEVEL_PRINTED;
 
@@ -866,7 +866,7 @@
     ctx.ctx = LYD_NODE_CTX(root);
 
     /* start */
-    ly_print(ctx.out, "{%s", delimiter);
+    ly_print_(ctx.out, "{%s", delimiter);
 
     /* content */
     LY_LIST_FOR(root, node) {
@@ -877,7 +877,7 @@
     }
 
     /* end */
-    ly_print(out, "%s}%s", delimiter, delimiter);
+    ly_print_(out, "%s}%s", delimiter, delimiter);
 
     assert(!ctx.open.count);
     ly_set_erase(&ctx.open, NULL);
