Skip to content

Commit 06a82f7

Browse files
committed
printer xml UPDATE print JSON any values
1 parent 2766cdf commit 06a82f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/printer_xml.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ xml_print_anydata(struct xmlpr_ctx *pctx, const struct lyd_node_any *node)
463463
pctx->options = prev_opts;
464464
break;
465465
case LYD_ANYDATA_STRING:
466+
case LYD_ANYDATA_JSON:
466467
/* escape XML-sensitive characters */
467468
if (!any->value.str[0]) {
468469
goto no_content;
@@ -478,9 +479,8 @@ xml_print_anydata(struct xmlpr_ctx *pctx, const struct lyd_node_any *node)
478479
}
479480
ly_print_(pctx->out, ">%s", any->value.str);
480481
break;
481-
case LYD_ANYDATA_JSON:
482482
case LYD_ANYDATA_LYB:
483-
/* JSON and LYB format is not supported */
483+
/* LYB format is not supported */
484484
LOGWRN(pctx->ctx, "Unable to print anydata content (type %d) as XML.", any->value_type);
485485
goto no_content;
486486
}

0 commit comments

Comments
 (0)