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

Validator does not check nested values in lists and dicts #25

Open
chumaumenze opened this issue Dec 16, 2019 · 2 comments
Open

Validator does not check nested values in lists and dicts #25

chumaumenze opened this issue Dec 16, 2019 · 2 comments

Comments

@chumaumenze
Copy link
Contributor

I have a payload, structured as follows:

{
    "alpha": {
        "bravo": {"charlie": "delta"},
        "whiskey": {"yankee": "zulu"}
    }
}

I am unable to validate items in alpha, i.e bravo and whiskey.


[
    {
        "alpha": {
            "bravo": "charlie"
        }
    },
    {
        "alpha": {
            "bravo": "charlie"
        }
    }
]

JSON Array raises an AttributeError and does not validate items in the list


{
    "alpha": {
        "bravo": "charlie",
        "victor": [1, 2, 3, {
            "a": {"b": "c"}
            }
        ],
        "whiskey": ["xray", 5.9, {"yankee": "zulu"}]
    }
}

Deeply nested values can not be validated.

@adekoder
Copy link
Owner

This is schema type of validation there is not support for schema validation but we can look in that direction also.

@adekoder
Copy link
Owner

You can checkout this package https://pypi.org/project/jsonschema/ for insights.

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

No branches or pull requests

2 participants