Skip to content

Add LYD_PARSE_ANYDATA_STRICT option#2458

Merged
michalvasko merged 5 commits into
CESNET:develfrom
ahassany:anydata-strict-validation
Dec 16, 2025
Merged

Add LYD_PARSE_ANYDATA_STRICT option#2458
michalvasko merged 5 commits into
CESNET:develfrom
ahassany:anydata-strict-validation

Conversation

@ahassany

Copy link
Copy Markdown
Contributor

Add an option to enable strict parsing for anydata subtrees in json and xml parsers.

The option is exposed in yanglint command line as -A, --anydata-strict.

Add an option to enable strict parsing for anydata subtrees in json
and xml parsers.

The option is exposed in yanglint command line as -A, --anydata-strict.

@michalvasko michalvasko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes are fine but tests should be added, an existing one can only be extended with a few more XML examples with this flag.

Comment thread src/parser_data.h
@ahassany

Copy link
Copy Markdown
Contributor Author

Thank @michalvasko for the feedback, just added some more unit tests.

Comment thread src/parser_json.c Outdated
Comment thread tools/lint/cmd_data.c Outdated
@michalvasko michalvasko merged commit aa3ae1d into CESNET:devel Dec 16, 2025
11 checks passed
@michalvasko

Copy link
Copy Markdown
Member

Thanks, merged.

@ahassany ahassany deleted the anydata-strict-validation branch December 16, 2025 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants