restconf json err return: too many {}
This commit is contained in:
parent
03be9c0567
commit
9b951b5ce6
2 changed files with 13 additions and 6 deletions
|
|
@ -188,11 +188,18 @@ api_return_err(clicon_handle h,
|
|||
FCGX_FPrintF(r->out, " </errors>\r\n");
|
||||
}
|
||||
else{
|
||||
FCGX_FPrintF(r->out, "{%s", pretty?"\r\n":"");
|
||||
FCGX_FPrintF(r->out, " \"ietf-restconf:errors\" : {%s", pretty?"\r\n":"");
|
||||
FCGX_FPrintF(r->out, " %s", cbuf_get(cb));
|
||||
FCGX_FPrintF(r->out, " }%s", pretty?"\r\n":"");
|
||||
FCGX_FPrintF(r->out, "}\r\n");
|
||||
if (pretty){
|
||||
FCGX_FPrintF(r->out, "{\r\n");
|
||||
FCGX_FPrintF(r->out, " \"ietf-restconf:errors\" : %s\r\n",
|
||||
cbuf_get(cb));
|
||||
FCGX_FPrintF(r->out, "}\r\n");
|
||||
}
|
||||
else{
|
||||
FCGX_FPrintF(r->out, "{");
|
||||
FCGX_FPrintF(r->out, "\"ietf-restconf:errors\" : ");
|
||||
FCGX_FPrintF(r->out, "%s", cbuf_get(cb));
|
||||
FCGX_FPrintF(r->out, "}\r\n");
|
||||
}
|
||||
}
|
||||
ok:
|
||||
retval = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue