printer data FEATURE function to check whether node should be printed

Fixes #1828
diff --git a/src/printer_json.c b/src/printer_json.c
index 3e33276..4c53f0f 100644
--- a/src/printer_json.c
+++ b/src/printer_json.c
@@ -632,7 +632,7 @@
     ly_bool has_content = 0;
 
     LY_LIST_FOR(lyd_child(node), child) {
-        if (ly_should_print(child, pctx->options)) {
+        if (lyd_node_should_print(child, pctx->options)) {
             break;
         }
     }
@@ -932,7 +932,7 @@
 static LY_ERR
 json_print_node(struct jsonpr_ctx *pctx, const struct lyd_node *node)
 {
-    if (!ly_should_print(node, pctx->options)) {
+    if (!lyd_node_should_print(node, pctx->options)) {
         if (json_print_array_is_last_inst(pctx, node)) {
             json_print_array_close(pctx);
         }