* Follow-up on [restconf GET json response does not encode top level node with namespace as per rfc #303](https://github.com/clicon/clixon/issues/303)
* Load/save JSON config file did not work * Added rfc7951 parameter to `clixon_json_parse_string()` and `clixon_json_parse_file()` * If set, honor RFC 7951: JSON Encoding of Data Modeled with YANG, eg it requires module name prefixes * If not set, parse as regular JSON * Test: added test_db.sh for datastore format tests
This commit is contained in:
parent
31719b5ef4
commit
97316e0bfa
13 changed files with 281 additions and 43 deletions
|
|
@ -50,7 +50,7 @@ int xml2json(FILE *f, cxobj *x, int pretty);
|
|||
int xml2json_cb(FILE *f, cxobj *x, int pretty, clicon_output_cb *fn);
|
||||
int json_print(FILE *f, cxobj *x);
|
||||
int xml2json_vec(FILE *f, cxobj **vec, size_t veclen, int pretty);
|
||||
int clixon_json_parse_string(char *str, yang_bind yb, yang_stmt *yspec, cxobj **xt, cxobj **xret);
|
||||
int clixon_json_parse_file(FILE *fp, yang_bind yb, yang_stmt *yspec, cxobj **xt, cxobj **xret);
|
||||
int clixon_json_parse_string(char *str, int rfc7951, yang_bind yb, yang_stmt *yspec, cxobj **xt, cxobj **xret);
|
||||
int clixon_json_parse_file(FILE *fp, int rfc7951, yang_bind yb, yang_stmt *yspec, cxobj **xt, cxobj **xret);
|
||||
|
||||
#endif /* _CLIXON_JSON_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue