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

Fix jsonization confusing dict for array #33

Merged
merged 1 commit into from
Jul 6, 2024

Conversation

mristin
Copy link
Contributor

@mristin mristin commented Jul 6, 2024

We fix the JSON de-serialization so that it explicitly check that a property is an array-like value instead of simply checking for inheritance from collections.abc.Iterable, as mappings are also iterables in Python.

This corresponds to aas-core-codegen bcab1a9c.

Fixes #31.

@mristin mristin force-pushed the mristin/Fix-jsonization-confusing-dict-for-iterable branch from 68df7ea to eb1a1fa Compare July 6, 2024 18:20
We fix the JSON de-serialization so that it explicitly check that a
property is an array-like value instead of simply checking for
inheritance from ``collections.abc.Iterable``, as mappings are also
iterables in Python.

This corresponds to [aas-core-codegen bcab1a9c].

[aas-core-codegen bcab1a9c]: aas-core-works/aas-core-codegen@bcab1a9c

Fixes #31.
@mristin mristin force-pushed the mristin/Fix-jsonization-confusing-dict-for-iterable branch from eb1a1fa to 2b1a543 Compare July 6, 2024 18:26
@mristin mristin merged commit 3a0c60a into main Jul 6, 2024
12 checks passed
@mristin mristin deleted the mristin/Fix-jsonization-confusing-dict-for-iterable branch July 6, 2024 18:29
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.

JSON deserialization: Empty objects accepted where arrays are expected
1 participant