Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data: option to loosen json data type validation #2344

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bradh352
Copy link

@bradh352 bradh352 commented Feb 6, 2025

Prior to v1.0.212 the default behavior was to allow numbers
and boolean values to be in quotes, which is technically a
violation of the spec.

This adds a new LY_CTX_LOOSE_JSON_DATATYPES context option
which will restore the prior behavior when enabled.

SONiC is using v1.0.73 currently and has a large installed base which
may be in violation of the new behavior, so adding such a flag is
required for this usecase.

Signed-off-by: Brad House (@bradh352)

Prior to v1.0.212 the default behavior was to allow numbers
and boolean values to be in quotes, which is technically a
violation of the spec.

This adds a new `LY_CTX_LOOSE_JSON_DATATYPES` context option
which will restore the prior behavior when enabled.

SONiC is using v1.0.73 currently and has a large installed base which
may be in violation of the new behavior, so adding such a flag is
required for this usecase.

Signed-off-by: Brad House <[email protected]>
@bradh352 bradh352 changed the title data: option to loosen data type validation data: option to loosen json data type validation Feb 6, 2025
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 7, 2025
libyang1 would treat "true" and true as identical, same with "1234" and 1234.
We need to restore this behavior so we don't break users.

Sent upstream here:
CESNET/libyang#2344
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 8, 2025
libyang1 would treat "true" and true as identical, same with "1234" and 1234.
We need to restore this behavior so we don't break users.

Sent upstream here:
CESNET/libyang#2344
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 9, 2025
libyang1 would treat "true" and true as identical, same with "1234" and 1234.
We need to restore this behavior so we don't break users.

Sent upstream here:
CESNET/libyang#2344
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 9, 2025
libyang1 would treat "true" and true as identical, same with "1234" and 1234.
We need to restore this behavior so we don't break users.

Sent upstream here:
CESNET/libyang#2344
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 11, 2025
libyang1 would treat "true" and true as identical, same with "1234" and 1234.
We need to restore this behavior so we don't break users.

Sent upstream here:
CESNET/libyang#2344
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 11, 2025
libyang1 would treat "true" and true as identical, same with "1234" and 1234.
We need to restore this behavior so we don't break users.

Sent upstream here:
CESNET/libyang#2344
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.

1 participant