From 2b1a54385a3c5fd59c165cd6d94f92478c57610c Mon Sep 17 00:00:00 2001 From: Marko Ristin Date: Sat, 6 Jul 2024 20:17:56 +0200 Subject: [PATCH] Fix jsonization confusing ``dict`` for array 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]: https://github.com/aas-core-works/aas-core-codegen/commit/bcab1a9c Fixes #31. --- aas_core3/jsonization.py | 1166 ++++++++++------- .../preferredName.json.exception | 2 +- .../Reference/keys.json.exception | 2 +- .../valueReferencePairs.json.exception | 2 +- .../embeddedDataSpecifications.json.exception | 2 +- .../annotations.json.exception | 2 +- .../description.json.exception | 2 +- .../displayName.json.exception | 2 +- .../embeddedDataSpecifications.json.exception | 2 +- .../extensions.json.exception | 2 +- .../qualifiers.json.exception | 2 +- .../supplementalSemanticIds.json.exception | 2 +- .../description.json.exception | 2 +- .../displayName.json.exception | 2 +- .../embeddedDataSpecifications.json.exception | 2 +- .../extensions.json.exception | 2 +- .../submodels.json.exception | 2 +- .../description.json.exception | 2 +- .../displayName.json.exception | 2 +- .../embeddedDataSpecifications.json.exception | 2 +- .../extensions.json.exception | 2 +- .../qualifiers.json.exception | 2 +- .../supplementalSemanticIds.json.exception | 2 +- .../Blob/description.json.exception | 2 +- .../Blob/displayName.json.exception | 2 +- .../embeddedDataSpecifications.json.exception | 2 +- .../Blob/extensions.json.exception | 2 +- .../Blob/qualifiers.json.exception | 2 +- .../supplementalSemanticIds.json.exception | 2 +- .../Capability/description.json.exception | 2 +- .../Capability/displayName.json.exception | 2 +- .../embeddedDataSpecifications.json.exception | 2 +- .../Capability/extensions.json.exception | 2 +- .../Capability/qualifiers.json.exception | 2 +- .../supplementalSemanticIds.json.exception | 2 +- .../description.json.exception | 2 +- .../displayName.json.exception | 2 +- .../embeddedDataSpecifications.json.exception | 2 +- .../extensions.json.exception | 2 +- .../isCaseOf.json.exception | 2 +- .../definition.json.exception | 2 +- .../preferredName.json.exception | 2 +- .../shortName.json.exception | 2 +- .../Entity/description.json.exception | 2 +- .../Entity/displayName.json.exception | 2 +- .../embeddedDataSpecifications.json.exception | 2 +- .../Entity/extensions.json.exception | 2 +- .../Entity/qualifiers.json.exception | 2 +- .../Entity/statements.json.exception | 2 +- .../supplementalSemanticIds.json.exception | 2 +- .../Extension/refersTo.json.exception | 2 +- .../supplementalSemanticIds.json.exception | 2 +- .../File/description.json.exception | 2 +- .../File/displayName.json.exception | 2 +- .../embeddedDataSpecifications.json.exception | 2 +- .../File/extensions.json.exception | 2 +- .../File/qualifiers.json.exception | 2 +- .../supplementalSemanticIds.json.exception | 2 +- .../description.json.exception | 2 +- .../displayName.json.exception | 2 +- .../embeddedDataSpecifications.json.exception | 2 +- .../extensions.json.exception | 2 +- .../qualifiers.json.exception | 2 +- .../supplementalSemanticIds.json.exception | 2 +- .../value.json.exception | 2 +- .../Operation/description.json.exception | 2 +- .../Operation/displayName.json.exception | 2 +- .../embeddedDataSpecifications.json.exception | 2 +- .../Operation/extensions.json.exception | 2 +- .../inoutputVariables.json.exception | 2 +- .../Operation/inputVariables.json.exception | 2 +- .../Operation/outputVariables.json.exception | 2 +- .../Operation/qualifiers.json.exception | 2 +- .../supplementalSemanticIds.json.exception | 2 +- .../Property/description.json.exception | 2 +- .../Property/displayName.json.exception | 2 +- .../embeddedDataSpecifications.json.exception | 2 +- .../Property/extensions.json.exception | 2 +- .../Property/qualifiers.json.exception | 2 +- .../supplementalSemanticIds.json.exception | 2 +- .../supplementalSemanticIds.json.exception | 2 +- .../Range/description.json.exception | 2 +- .../Range/displayName.json.exception | 2 +- .../embeddedDataSpecifications.json.exception | 2 +- .../Range/extensions.json.exception | 2 +- .../Range/qualifiers.json.exception | 2 +- .../supplementalSemanticIds.json.exception | 2 +- .../Reference/keys.json.exception | 2 +- .../description.json.exception | 2 +- .../displayName.json.exception | 2 +- .../embeddedDataSpecifications.json.exception | 2 +- .../extensions.json.exception | 2 +- .../qualifiers.json.exception | 2 +- .../supplementalSemanticIds.json.exception | 2 +- .../description.json.exception | 2 +- .../displayName.json.exception | 2 +- .../embeddedDataSpecifications.json.exception | 2 +- .../extensions.json.exception | 2 +- .../qualifiers.json.exception | 2 +- .../supplementalSemanticIds.json.exception | 2 +- .../supplementalSemanticIds.json.exception | 2 +- .../Submodel/description.json.exception | 2 +- .../Submodel/displayName.json.exception | 2 +- .../embeddedDataSpecifications.json.exception | 2 +- .../Submodel/extensions.json.exception | 2 +- .../Submodel/qualifiers.json.exception | 2 +- .../Submodel/submodelElements.json.exception | 2 +- .../supplementalSemanticIds.json.exception | 2 +- .../description.json.exception | 2 +- .../displayName.json.exception | 2 +- .../embeddedDataSpecifications.json.exception | 2 +- .../extensions.json.exception | 2 +- .../qualifiers.json.exception | 2 +- .../supplementalSemanticIds.json.exception | 2 +- .../value.json.exception | 2 +- .../description.json.exception | 2 +- .../displayName.json.exception | 2 +- .../embeddedDataSpecifications.json.exception | 2 +- .../extensions.json.exception | 2 +- .../qualifiers.json.exception | 2 +- .../supplementalSemanticIds.json.exception | 2 +- .../SubmodelElementList/value.json.exception | 2 +- .../valueReferencePairs.json.exception | 2 +- .../assetAdministrationShells.json.exception | 2 +- .../conceptDescriptions.json.exception | 2 +- .../Environment/submodels.json.exception | 2 +- tests/test_jsonization_and_is_array_like.py | 34 + 127 files changed, 829 insertions(+), 621 deletions(-) create mode 100644 tests/test_jsonization_and_is_array_like.py diff --git a/aas_core3/jsonization.py b/aas_core3/jsonization.py index 7dbd7df4..0b3e7fc8 100644 --- a/aas_core3/jsonization.py +++ b/aas_core3/jsonization.py @@ -15,6 +15,7 @@ import collections.abc import sys from typing import ( + cast, Any, Callable, Iterable, @@ -205,6 +206,55 @@ def _bytes_from_jsonable(jsonable: Jsonable) -> bytes: return base64.b64decode(jsonable.encode("ascii")) +def _try_to_cast_to_array_like(jsonable: Jsonable) -> Optional[Iterable[Any]]: + """ + Try to cast the ``jsonable`` to something like a JSON array. + + In particular, we explicitly check that the ``jsonable`` is not a mapping, as we + do not want to mistake dictionaries (*i.e.* de-serialized JSON objects) for lists. + + >>> assert _try_to_cast_to_array_like(True) is None + + >>> assert _try_to_cast_to_array_like(0) is None + + >>> assert _try_to_cast_to_array_like(2.2) is None + + >>> assert _try_to_cast_to_array_like("hello") is None + + >>> assert _try_to_cast_to_array_like(b"hello") is None + + >>> _try_to_cast_to_array_like([1, 2]) + [1, 2] + + >>> assert _try_to_cast_to_array_like({"a": 3}) is None + + >>> assert _try_to_cast_to_array_like(collections.OrderedDict()) is None + + >>> _try_to_cast_to_array_like(range(1, 2)) + range(1, 2) + + >>> _try_to_cast_to_array_like((1, 2)) + (1, 2) + + >>> assert _try_to_cast_to_array_like({1, 2, 3}) is None + """ + if ( + not isinstance(jsonable, (str, bytearray, bytes)) + and hasattr(jsonable, "__iter__") + and not hasattr(jsonable, "keys") + # NOTE (mristin): + # There is no easy way to check for sets as opposed to sequence except + # for checking for direct inheritance. A sequence also inherits from + # a collection, so both sequences and sets provide ``__contains__`` method. + # + # See: https://docs.python.org/3/library/collections.abc.html + and not isinstance(jsonable, collections.abc.Set) + ): + return cast(Iterable[Any], jsonable) + + return None + + def has_semantics_from_jsonable(jsonable: Jsonable) -> aas_types.HasSemantics: """ Parse an instance of :py:class:`.types.HasSemantics` from the JSON-able @@ -267,17 +317,18 @@ def set_supplemental_semantic_ids_from_jsonable(self, jsonable: Jsonable) -> Non :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -314,17 +365,18 @@ def set_refers_to_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -579,17 +631,18 @@ def set_embedded_data_specifications_from_jsonable( :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.EmbeddedDataSpecification] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = embedded_data_specification_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -750,17 +803,18 @@ def set_supplemental_semantic_ids_from_jsonable(self, jsonable: Jsonable) -> Non :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -879,17 +933,18 @@ def set_extensions_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Extension] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = extension_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -918,17 +973,18 @@ def set_display_name_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringNameType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_name_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -941,17 +997,18 @@ def set_description_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringTextType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_text_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -982,17 +1039,18 @@ def set_embedded_data_specifications_from_jsonable( :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.EmbeddedDataSpecification] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = embedded_data_specification_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -1021,17 +1079,18 @@ def set_submodels_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -1126,17 +1185,18 @@ def set_specific_asset_ids_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.SpecificAssetID] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = specific_asset_id_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -1308,17 +1368,18 @@ def set_supplemental_semantic_ids_from_jsonable(self, jsonable: Jsonable) -> Non :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -1421,17 +1482,18 @@ def set_extensions_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Extension] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = extension_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -1460,17 +1522,18 @@ def set_display_name_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringNameType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_name_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -1483,17 +1546,18 @@ def set_description_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringTextType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_text_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -1538,17 +1602,18 @@ def set_supplemental_semantic_ids_from_jsonable(self, jsonable: Jsonable) -> Non :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -1561,17 +1626,18 @@ def set_qualifiers_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Qualifier] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = qualifier_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -1586,17 +1652,18 @@ def set_embedded_data_specifications_from_jsonable( :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.EmbeddedDataSpecification] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = embedded_data_specification_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -1609,17 +1676,18 @@ def set_submodel_elements_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.SubmodelElement] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = submodel_element_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -1767,17 +1835,18 @@ def set_extensions_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Extension] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = extension_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -1806,17 +1875,18 @@ def set_display_name_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringNameType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_name_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -1829,17 +1899,18 @@ def set_description_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringTextType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_text_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -1860,17 +1931,18 @@ def set_supplemental_semantic_ids_from_jsonable(self, jsonable: Jsonable) -> Non :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -1883,17 +1955,18 @@ def set_qualifiers_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Qualifier] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = qualifier_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -1908,17 +1981,18 @@ def set_embedded_data_specifications_from_jsonable( :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.EmbeddedDataSpecification] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = embedded_data_specification_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2053,17 +2127,18 @@ def set_extensions_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Extension] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = extension_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2092,17 +2167,18 @@ def set_display_name_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringNameType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_name_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2115,17 +2191,18 @@ def set_description_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringTextType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_text_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2146,17 +2223,18 @@ def set_supplemental_semantic_ids_from_jsonable(self, jsonable: Jsonable) -> Non :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2169,17 +2247,18 @@ def set_qualifiers_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Qualifier] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = qualifier_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2194,17 +2273,18 @@ def set_embedded_data_specifications_from_jsonable( :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.EmbeddedDataSpecification] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = embedded_data_specification_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2249,17 +2329,18 @@ def set_value_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.SubmodelElement] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = submodel_element_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2345,17 +2426,18 @@ def set_extensions_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Extension] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = extension_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2384,17 +2466,18 @@ def set_display_name_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringNameType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_name_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2407,17 +2490,18 @@ def set_description_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringTextType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_text_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2438,17 +2522,18 @@ def set_supplemental_semantic_ids_from_jsonable(self, jsonable: Jsonable) -> Non :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2461,17 +2546,18 @@ def set_qualifiers_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Qualifier] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = qualifier_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2486,17 +2572,18 @@ def set_embedded_data_specifications_from_jsonable( :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.EmbeddedDataSpecification] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = embedded_data_specification_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2509,17 +2596,18 @@ def set_value_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.SubmodelElement] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = submodel_element_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2630,17 +2718,18 @@ def set_extensions_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Extension] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = extension_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2669,17 +2758,18 @@ def set_display_name_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringNameType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_name_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2692,17 +2782,18 @@ def set_description_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringTextType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_text_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2723,17 +2814,18 @@ def set_supplemental_semantic_ids_from_jsonable(self, jsonable: Jsonable) -> Non :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2746,17 +2838,18 @@ def set_qualifiers_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Qualifier] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = qualifier_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2771,17 +2864,18 @@ def set_embedded_data_specifications_from_jsonable( :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.EmbeddedDataSpecification] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = embedded_data_specification_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2886,17 +2980,18 @@ def set_extensions_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Extension] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = extension_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2925,17 +3020,18 @@ def set_display_name_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringNameType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_name_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2948,17 +3044,18 @@ def set_description_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringTextType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_text_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -2979,17 +3076,18 @@ def set_supplemental_semantic_ids_from_jsonable(self, jsonable: Jsonable) -> Non :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3002,17 +3100,18 @@ def set_qualifiers_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Qualifier] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = qualifier_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3027,17 +3126,18 @@ def set_embedded_data_specifications_from_jsonable( :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.EmbeddedDataSpecification] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = embedded_data_specification_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3050,17 +3150,18 @@ def set_value_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringTextType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_text_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3148,17 +3249,18 @@ def set_extensions_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Extension] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = extension_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3187,17 +3289,18 @@ def set_display_name_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringNameType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_name_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3210,17 +3313,18 @@ def set_description_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringTextType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_text_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3241,17 +3345,18 @@ def set_supplemental_semantic_ids_from_jsonable(self, jsonable: Jsonable) -> Non :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3264,17 +3369,18 @@ def set_qualifiers_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Qualifier] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = qualifier_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3289,17 +3395,18 @@ def set_embedded_data_specifications_from_jsonable( :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.EmbeddedDataSpecification] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = embedded_data_specification_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3403,17 +3510,18 @@ def set_extensions_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Extension] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = extension_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3442,17 +3550,18 @@ def set_display_name_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringNameType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_name_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3465,17 +3574,18 @@ def set_description_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringTextType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_text_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3496,17 +3606,18 @@ def set_supplemental_semantic_ids_from_jsonable(self, jsonable: Jsonable) -> Non :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3519,17 +3630,18 @@ def set_qualifiers_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Qualifier] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = qualifier_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3544,17 +3656,18 @@ def set_embedded_data_specifications_from_jsonable( :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.EmbeddedDataSpecification] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = embedded_data_specification_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3638,17 +3751,18 @@ def set_extensions_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Extension] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = extension_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3677,17 +3791,18 @@ def set_display_name_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringNameType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_name_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3700,17 +3815,18 @@ def set_description_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringTextType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_text_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3731,17 +3847,18 @@ def set_supplemental_semantic_ids_from_jsonable(self, jsonable: Jsonable) -> Non :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3754,17 +3871,18 @@ def set_qualifiers_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Qualifier] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = qualifier_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3779,17 +3897,18 @@ def set_embedded_data_specifications_from_jsonable( :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.EmbeddedDataSpecification] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = embedded_data_specification_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3885,17 +4004,18 @@ def set_extensions_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Extension] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = extension_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3924,17 +4044,18 @@ def set_display_name_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringNameType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_name_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3947,17 +4068,18 @@ def set_description_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringTextType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_text_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -3978,17 +4100,18 @@ def set_supplemental_semantic_ids_from_jsonable(self, jsonable: Jsonable) -> Non :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -4001,17 +4124,18 @@ def set_qualifiers_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Qualifier] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = qualifier_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -4026,17 +4150,18 @@ def set_embedded_data_specifications_from_jsonable( :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.EmbeddedDataSpecification] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = embedded_data_specification_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -4133,17 +4258,18 @@ def set_extensions_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Extension] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = extension_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -4172,17 +4298,18 @@ def set_display_name_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringNameType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_name_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -4195,17 +4322,18 @@ def set_description_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringTextType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_text_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -4226,17 +4354,18 @@ def set_supplemental_semantic_ids_from_jsonable(self, jsonable: Jsonable) -> Non :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -4249,17 +4378,18 @@ def set_qualifiers_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Qualifier] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = qualifier_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -4274,17 +4404,18 @@ def set_embedded_data_specifications_from_jsonable( :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.EmbeddedDataSpecification] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = embedded_data_specification_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -4313,17 +4444,18 @@ def set_annotations_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.DataElement] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = data_element_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -4411,17 +4543,18 @@ def set_extensions_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Extension] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = extension_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -4450,17 +4583,18 @@ def set_display_name_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringNameType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_name_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -4473,17 +4607,18 @@ def set_description_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringTextType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_text_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -4504,17 +4639,18 @@ def set_supplemental_semantic_ids_from_jsonable(self, jsonable: Jsonable) -> Non :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -4527,17 +4663,18 @@ def set_qualifiers_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Qualifier] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = qualifier_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -4552,17 +4689,18 @@ def set_embedded_data_specifications_from_jsonable( :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.EmbeddedDataSpecification] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = embedded_data_specification_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -4575,17 +4713,18 @@ def set_statements_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.SubmodelElement] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = submodel_element_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -4614,17 +4753,18 @@ def set_specific_asset_ids_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.SpecificAssetID] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = specific_asset_id_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -4941,17 +5081,18 @@ def set_extensions_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Extension] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = extension_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -4980,17 +5121,18 @@ def set_display_name_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringNameType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_name_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5003,17 +5145,18 @@ def set_description_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringTextType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_text_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5034,17 +5177,18 @@ def set_supplemental_semantic_ids_from_jsonable(self, jsonable: Jsonable) -> Non :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5057,17 +5201,18 @@ def set_qualifiers_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Qualifier] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = qualifier_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5082,17 +5227,18 @@ def set_embedded_data_specifications_from_jsonable( :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.EmbeddedDataSpecification] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = embedded_data_specification_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5251,17 +5397,18 @@ def set_extensions_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Extension] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = extension_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5290,17 +5437,18 @@ def set_display_name_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringNameType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_name_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5313,17 +5461,18 @@ def set_description_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringTextType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_text_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5344,17 +5493,18 @@ def set_supplemental_semantic_ids_from_jsonable(self, jsonable: Jsonable) -> Non :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5367,17 +5517,18 @@ def set_qualifiers_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Qualifier] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = qualifier_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5392,17 +5543,18 @@ def set_embedded_data_specifications_from_jsonable( :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.EmbeddedDataSpecification] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = embedded_data_specification_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5415,17 +5567,18 @@ def set_input_variables_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.OperationVariable] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = operation_variable_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5438,17 +5591,18 @@ def set_output_variables_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.OperationVariable] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = operation_variable_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5461,17 +5615,18 @@ def set_inoutput_variables_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.OperationVariable] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = operation_variable_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5598,17 +5753,18 @@ def set_extensions_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Extension] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = extension_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5637,17 +5793,18 @@ def set_display_name_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringNameType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_name_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5660,17 +5817,18 @@ def set_description_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringTextType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_text_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5691,17 +5849,18 @@ def set_supplemental_semantic_ids_from_jsonable(self, jsonable: Jsonable) -> Non :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5714,17 +5873,18 @@ def set_qualifiers_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Qualifier] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = qualifier_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5739,17 +5899,18 @@ def set_embedded_data_specifications_from_jsonable( :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.EmbeddedDataSpecification] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = embedded_data_specification_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5822,17 +5983,18 @@ def set_extensions_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Extension] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = extension_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5861,17 +6023,18 @@ def set_display_name_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringNameType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_name_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5884,17 +6047,18 @@ def set_description_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringTextType] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_text_type_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5925,17 +6089,18 @@ def set_embedded_data_specifications_from_jsonable( :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.EmbeddedDataSpecification] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = embedded_data_specification_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -5948,17 +6113,18 @@ def set_is_case_of_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Reference] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = reference_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -6066,17 +6232,18 @@ def set_keys_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Key] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = key_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -6410,17 +6577,18 @@ def set_asset_administration_shells_from_jsonable(self, jsonable: Jsonable) -> N :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.AssetAdministrationShell] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = asset_administration_shell_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -6433,17 +6601,18 @@ def set_submodels_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.Submodel] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = submodel_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -6456,17 +6625,18 @@ def set_concept_descriptions_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.ConceptDescription] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = concept_description_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -6801,17 +6971,18 @@ def set_value_reference_pairs_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.ValueReferencePair] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = value_reference_pair_from_jsonable(jsonable_item) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -7083,19 +7254,20 @@ def set_preferred_name_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringPreferredNameTypeIEC61360] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_preferred_name_type_iec_61360_from_jsonable( jsonable_item ) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -7108,19 +7280,20 @@ def set_short_name_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringShortNameTypeIEC61360] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_short_name_type_iec_61360_from_jsonable( jsonable_item ) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) @@ -7173,19 +7346,20 @@ def set_definition_from_jsonable(self, jsonable: Jsonable) -> None: :param jsonable: input to be parsed """ - if not isinstance(jsonable, collections.abc.Iterable): + array_like = _try_to_cast_to_array_like(jsonable) + if array_like is None: raise DeserializationException( - f"Expected an iterable, but got: {type(jsonable)}" + f"Expected something array-like, but got: {type(jsonable)}" ) items: List[aas_types.LangStringDefinitionTypeIEC61360] = [] - for i, jsonable_item in enumerate(jsonable): + for i, jsonable_item in enumerate(array_like): try: item = lang_string_definition_type_iec_61360_from_jsonable( jsonable_item ) except DeserializationException as exception: - exception.path._prepend(IndexSegment(jsonable, i)) + exception.path._prepend(IndexSegment(array_like, i)) raise items.append(item) diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/NullViolation/DataSpecificationIec61360/preferredName.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/NullViolation/DataSpecificationIec61360/preferredName.json.exception index b853e623..050542a6 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/NullViolation/DataSpecificationIec61360/preferredName.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/NullViolation/DataSpecificationIec61360/preferredName.json.exception @@ -1 +1 @@ -assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.preferredName: Expected an iterable, but got: \ No newline at end of file +assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.preferredName: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/NullViolation/Reference/keys.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/NullViolation/Reference/keys.json.exception index e9a3a408..d574b7d0 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/NullViolation/Reference/keys.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/NullViolation/Reference/keys.json.exception @@ -1 +1 @@ -assetAdministrationShells[0].derivedFrom.keys: Expected an iterable, but got: \ No newline at end of file +assetAdministrationShells[0].derivedFrom.keys: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/NullViolation/ValueList/valueReferencePairs.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/NullViolation/ValueList/valueReferencePairs.json.exception index 6805922e..c1297704 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/NullViolation/ValueList/valueReferencePairs.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/NullViolation/ValueList/valueReferencePairs.json.exception @@ -1 +1 @@ -assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.valueList.valueReferencePairs: Expected an iterable, but got: \ No newline at end of file +assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.valueList.valueReferencePairs: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AdministrativeInformation/embeddedDataSpecifications.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AdministrativeInformation/embeddedDataSpecifications.json.exception index 768de980..dddc1c4d 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AdministrativeInformation/embeddedDataSpecifications.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AdministrativeInformation/embeddedDataSpecifications.json.exception @@ -1 +1 @@ -assetAdministrationShells[0].administration.embeddedDataSpecifications[0]: Expected a mapping, but got: \ No newline at end of file +assetAdministrationShells[0].administration.embeddedDataSpecifications: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/annotations.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/annotations.json.exception index eff4afd4..69b3680f 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/annotations.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/annotations.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].annotations[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].annotations: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/description.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/description.json.exception index caace89e..3dbc508a 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/description.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/description.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].description[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].description: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/displayName.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/displayName.json.exception index f416b3f4..3e49ade7 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/displayName.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/displayName.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].displayName[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].displayName: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/embeddedDataSpecifications.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/embeddedDataSpecifications.json.exception index e58207c3..fa18a450 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/embeddedDataSpecifications.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/embeddedDataSpecifications.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].embeddedDataSpecifications[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].embeddedDataSpecifications: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/extensions.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/extensions.json.exception index f4874863..9b31213d 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/extensions.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/extensions.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].extensions[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].extensions: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/qualifiers.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/qualifiers.json.exception index 44288000..d6807b6f 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/qualifiers.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/qualifiers.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].qualifiers[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].qualifiers: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/supplementalSemanticIds.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/supplementalSemanticIds.json.exception index dc98ea9c..86dee8b2 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/supplementalSemanticIds.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AnnotatedRelationshipElement/supplementalSemanticIds.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].supplementalSemanticIds[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].supplementalSemanticIds: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AssetAdministrationShell/description.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AssetAdministrationShell/description.json.exception index 0942330f..6a63c9f1 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AssetAdministrationShell/description.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AssetAdministrationShell/description.json.exception @@ -1 +1 @@ -assetAdministrationShells[0].description[0]: Expected a mapping, but got: \ No newline at end of file +assetAdministrationShells[0].description: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AssetAdministrationShell/displayName.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AssetAdministrationShell/displayName.json.exception index ab1ad8fe..ca804e59 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AssetAdministrationShell/displayName.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AssetAdministrationShell/displayName.json.exception @@ -1 +1 @@ -assetAdministrationShells[0].displayName[0]: Expected a mapping, but got: \ No newline at end of file +assetAdministrationShells[0].displayName: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AssetAdministrationShell/embeddedDataSpecifications.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AssetAdministrationShell/embeddedDataSpecifications.json.exception index 96af1bf0..c1f15b61 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AssetAdministrationShell/embeddedDataSpecifications.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AssetAdministrationShell/embeddedDataSpecifications.json.exception @@ -1 +1 @@ -assetAdministrationShells[0].embeddedDataSpecifications[0]: Expected a mapping, but got: \ No newline at end of file +assetAdministrationShells[0].embeddedDataSpecifications: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AssetAdministrationShell/extensions.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AssetAdministrationShell/extensions.json.exception index 10b3029e..8068cf75 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AssetAdministrationShell/extensions.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AssetAdministrationShell/extensions.json.exception @@ -1 +1 @@ -assetAdministrationShells[0].extensions[0]: Expected a mapping, but got: \ No newline at end of file +assetAdministrationShells[0].extensions: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AssetAdministrationShell/submodels.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AssetAdministrationShell/submodels.json.exception index 35996ec3..cd8a5e5f 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AssetAdministrationShell/submodels.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/AssetAdministrationShell/submodels.json.exception @@ -1 +1 @@ -assetAdministrationShells[0].submodels[0]: Expected a mapping, but got: \ No newline at end of file +assetAdministrationShells[0].submodels: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/description.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/description.json.exception index caace89e..3dbc508a 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/description.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/description.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].description[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].description: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/displayName.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/displayName.json.exception index f416b3f4..3e49ade7 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/displayName.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/displayName.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].displayName[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].displayName: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/embeddedDataSpecifications.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/embeddedDataSpecifications.json.exception index e58207c3..fa18a450 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/embeddedDataSpecifications.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/embeddedDataSpecifications.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].embeddedDataSpecifications[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].embeddedDataSpecifications: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/extensions.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/extensions.json.exception index f4874863..9b31213d 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/extensions.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/extensions.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].extensions[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].extensions: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/qualifiers.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/qualifiers.json.exception index 44288000..d6807b6f 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/qualifiers.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/qualifiers.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].qualifiers[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].qualifiers: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/supplementalSemanticIds.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/supplementalSemanticIds.json.exception index dc98ea9c..86dee8b2 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/supplementalSemanticIds.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/BasicEventElement/supplementalSemanticIds.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].supplementalSemanticIds[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].supplementalSemanticIds: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/description.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/description.json.exception index caace89e..3dbc508a 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/description.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/description.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].description[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].description: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/displayName.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/displayName.json.exception index f416b3f4..3e49ade7 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/displayName.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/displayName.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].displayName[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].displayName: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/embeddedDataSpecifications.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/embeddedDataSpecifications.json.exception index e58207c3..fa18a450 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/embeddedDataSpecifications.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/embeddedDataSpecifications.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].embeddedDataSpecifications[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].embeddedDataSpecifications: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/extensions.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/extensions.json.exception index f4874863..9b31213d 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/extensions.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/extensions.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].extensions[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].extensions: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/qualifiers.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/qualifiers.json.exception index 44288000..d6807b6f 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/qualifiers.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/qualifiers.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].qualifiers[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].qualifiers: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/supplementalSemanticIds.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/supplementalSemanticIds.json.exception index dc98ea9c..86dee8b2 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/supplementalSemanticIds.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Blob/supplementalSemanticIds.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].supplementalSemanticIds[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].supplementalSemanticIds: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/description.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/description.json.exception index caace89e..3dbc508a 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/description.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/description.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].description[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].description: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/displayName.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/displayName.json.exception index f416b3f4..3e49ade7 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/displayName.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/displayName.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].displayName[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].displayName: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/embeddedDataSpecifications.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/embeddedDataSpecifications.json.exception index e58207c3..fa18a450 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/embeddedDataSpecifications.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/embeddedDataSpecifications.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].embeddedDataSpecifications[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].embeddedDataSpecifications: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/extensions.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/extensions.json.exception index f4874863..9b31213d 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/extensions.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/extensions.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].extensions[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].extensions: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/qualifiers.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/qualifiers.json.exception index 44288000..d6807b6f 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/qualifiers.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/qualifiers.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].qualifiers[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].qualifiers: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/supplementalSemanticIds.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/supplementalSemanticIds.json.exception index dc98ea9c..86dee8b2 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/supplementalSemanticIds.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Capability/supplementalSemanticIds.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].supplementalSemanticIds[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].supplementalSemanticIds: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ConceptDescription/description.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ConceptDescription/description.json.exception index f63dd01a..b7f528d9 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ConceptDescription/description.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ConceptDescription/description.json.exception @@ -1 +1 @@ -conceptDescriptions[0].description[0]: Expected a mapping, but got: \ No newline at end of file +conceptDescriptions[0].description: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ConceptDescription/displayName.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ConceptDescription/displayName.json.exception index 57c95296..67306931 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ConceptDescription/displayName.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ConceptDescription/displayName.json.exception @@ -1 +1 @@ -conceptDescriptions[0].displayName[0]: Expected a mapping, but got: \ No newline at end of file +conceptDescriptions[0].displayName: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ConceptDescription/embeddedDataSpecifications.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ConceptDescription/embeddedDataSpecifications.json.exception index de0c3e41..ca03d144 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ConceptDescription/embeddedDataSpecifications.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ConceptDescription/embeddedDataSpecifications.json.exception @@ -1 +1 @@ -conceptDescriptions[0].embeddedDataSpecifications[0]: Expected a mapping, but got: \ No newline at end of file +conceptDescriptions[0].embeddedDataSpecifications: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ConceptDescription/extensions.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ConceptDescription/extensions.json.exception index 78145bd0..29f7b3d5 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ConceptDescription/extensions.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ConceptDescription/extensions.json.exception @@ -1 +1 @@ -conceptDescriptions[0].extensions[0]: Expected a mapping, but got: \ No newline at end of file +conceptDescriptions[0].extensions: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ConceptDescription/isCaseOf.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ConceptDescription/isCaseOf.json.exception index 28d5b9ef..4d366161 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ConceptDescription/isCaseOf.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ConceptDescription/isCaseOf.json.exception @@ -1 +1 @@ -conceptDescriptions[0].isCaseOf[0]: Expected a mapping, but got: \ No newline at end of file +conceptDescriptions[0].isCaseOf: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/DataSpecificationIec61360/definition.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/DataSpecificationIec61360/definition.json.exception index dfdf0bbf..879986ec 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/DataSpecificationIec61360/definition.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/DataSpecificationIec61360/definition.json.exception @@ -1 +1 @@ -assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.definition[0]: Expected a mapping, but got: \ No newline at end of file +assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.definition: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/DataSpecificationIec61360/preferredName.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/DataSpecificationIec61360/preferredName.json.exception index 28b94465..69b15799 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/DataSpecificationIec61360/preferredName.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/DataSpecificationIec61360/preferredName.json.exception @@ -1 +1 @@ -assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.preferredName[0]: Expected a mapping, but got: \ No newline at end of file +assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.preferredName: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/DataSpecificationIec61360/shortName.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/DataSpecificationIec61360/shortName.json.exception index dcd756aa..64d7d682 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/DataSpecificationIec61360/shortName.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/DataSpecificationIec61360/shortName.json.exception @@ -1 +1 @@ -assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.shortName[0]: Expected a mapping, but got: \ No newline at end of file +assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.shortName: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/description.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/description.json.exception index caace89e..3dbc508a 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/description.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/description.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].description[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].description: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/displayName.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/displayName.json.exception index f416b3f4..3e49ade7 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/displayName.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/displayName.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].displayName[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].displayName: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/embeddedDataSpecifications.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/embeddedDataSpecifications.json.exception index e58207c3..fa18a450 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/embeddedDataSpecifications.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/embeddedDataSpecifications.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].embeddedDataSpecifications[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].embeddedDataSpecifications: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/extensions.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/extensions.json.exception index f4874863..9b31213d 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/extensions.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/extensions.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].extensions[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].extensions: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/qualifiers.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/qualifiers.json.exception index 44288000..d6807b6f 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/qualifiers.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/qualifiers.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].qualifiers[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].qualifiers: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/statements.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/statements.json.exception index b9ad1d50..6b8ebfc9 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/statements.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/statements.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].statements[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].statements: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/supplementalSemanticIds.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/supplementalSemanticIds.json.exception index dc98ea9c..86dee8b2 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/supplementalSemanticIds.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Entity/supplementalSemanticIds.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].supplementalSemanticIds[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].supplementalSemanticIds: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Extension/refersTo.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Extension/refersTo.json.exception index b9c14d3e..cae098c2 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Extension/refersTo.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Extension/refersTo.json.exception @@ -1 +1 @@ -assetAdministrationShells[0].extensions[0].refersTo[0]: Expected a mapping, but got: \ No newline at end of file +assetAdministrationShells[0].extensions[0].refersTo: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Extension/supplementalSemanticIds.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Extension/supplementalSemanticIds.json.exception index 94830626..2fddf493 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Extension/supplementalSemanticIds.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Extension/supplementalSemanticIds.json.exception @@ -1 +1 @@ -assetAdministrationShells[0].extensions[0].supplementalSemanticIds[0]: Expected a mapping, but got: \ No newline at end of file +assetAdministrationShells[0].extensions[0].supplementalSemanticIds: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/description.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/description.json.exception index caace89e..3dbc508a 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/description.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/description.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].description[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].description: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/displayName.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/displayName.json.exception index f416b3f4..3e49ade7 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/displayName.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/displayName.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].displayName[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].displayName: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/embeddedDataSpecifications.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/embeddedDataSpecifications.json.exception index e58207c3..fa18a450 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/embeddedDataSpecifications.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/embeddedDataSpecifications.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].embeddedDataSpecifications[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].embeddedDataSpecifications: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/extensions.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/extensions.json.exception index f4874863..9b31213d 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/extensions.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/extensions.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].extensions[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].extensions: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/qualifiers.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/qualifiers.json.exception index 44288000..d6807b6f 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/qualifiers.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/qualifiers.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].qualifiers[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].qualifiers: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/supplementalSemanticIds.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/supplementalSemanticIds.json.exception index dc98ea9c..86dee8b2 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/supplementalSemanticIds.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/File/supplementalSemanticIds.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].supplementalSemanticIds[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].supplementalSemanticIds: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/description.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/description.json.exception index caace89e..3dbc508a 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/description.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/description.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].description[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].description: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/displayName.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/displayName.json.exception index f416b3f4..3e49ade7 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/displayName.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/displayName.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].displayName[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].displayName: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/embeddedDataSpecifications.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/embeddedDataSpecifications.json.exception index e58207c3..fa18a450 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/embeddedDataSpecifications.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/embeddedDataSpecifications.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].embeddedDataSpecifications[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].embeddedDataSpecifications: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/extensions.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/extensions.json.exception index f4874863..9b31213d 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/extensions.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/extensions.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].extensions[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].extensions: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/qualifiers.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/qualifiers.json.exception index 44288000..d6807b6f 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/qualifiers.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/qualifiers.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].qualifiers[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].qualifiers: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/supplementalSemanticIds.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/supplementalSemanticIds.json.exception index dc98ea9c..86dee8b2 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/supplementalSemanticIds.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/supplementalSemanticIds.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].supplementalSemanticIds[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].supplementalSemanticIds: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/value.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/value.json.exception index 9fa23806..61127567 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/value.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/MultiLanguageProperty/value.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].value[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].value: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/description.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/description.json.exception index caace89e..3dbc508a 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/description.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/description.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].description[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].description: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/displayName.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/displayName.json.exception index f416b3f4..3e49ade7 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/displayName.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/displayName.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].displayName[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].displayName: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/embeddedDataSpecifications.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/embeddedDataSpecifications.json.exception index e58207c3..fa18a450 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/embeddedDataSpecifications.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/embeddedDataSpecifications.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].embeddedDataSpecifications[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].embeddedDataSpecifications: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/extensions.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/extensions.json.exception index f4874863..9b31213d 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/extensions.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/extensions.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].extensions[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].extensions: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/inoutputVariables.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/inoutputVariables.json.exception index 3d71d063..a959802e 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/inoutputVariables.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/inoutputVariables.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].inoutputVariables[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].inoutputVariables: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/inputVariables.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/inputVariables.json.exception index 288bab79..20a87bca 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/inputVariables.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/inputVariables.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].inputVariables[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].inputVariables: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/outputVariables.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/outputVariables.json.exception index 8d536ad6..4bb6b284 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/outputVariables.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/outputVariables.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].outputVariables[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].outputVariables: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/qualifiers.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/qualifiers.json.exception index 44288000..d6807b6f 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/qualifiers.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/qualifiers.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].qualifiers[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].qualifiers: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/supplementalSemanticIds.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/supplementalSemanticIds.json.exception index dc98ea9c..86dee8b2 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/supplementalSemanticIds.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Operation/supplementalSemanticIds.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].supplementalSemanticIds[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].supplementalSemanticIds: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/description.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/description.json.exception index caace89e..3dbc508a 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/description.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/description.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].description[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].description: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/displayName.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/displayName.json.exception index f416b3f4..3e49ade7 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/displayName.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/displayName.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].displayName[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].displayName: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/embeddedDataSpecifications.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/embeddedDataSpecifications.json.exception index e58207c3..fa18a450 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/embeddedDataSpecifications.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/embeddedDataSpecifications.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].embeddedDataSpecifications[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].embeddedDataSpecifications: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/extensions.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/extensions.json.exception index f4874863..9b31213d 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/extensions.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/extensions.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].extensions[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].extensions: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/qualifiers.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/qualifiers.json.exception index 44288000..d6807b6f 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/qualifiers.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/qualifiers.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].qualifiers[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].qualifiers: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/supplementalSemanticIds.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/supplementalSemanticIds.json.exception index dc98ea9c..86dee8b2 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/supplementalSemanticIds.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Property/supplementalSemanticIds.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].supplementalSemanticIds[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].supplementalSemanticIds: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Qualifier/supplementalSemanticIds.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Qualifier/supplementalSemanticIds.json.exception index 02d579ab..1bc4d1d1 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Qualifier/supplementalSemanticIds.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Qualifier/supplementalSemanticIds.json.exception @@ -1 +1 @@ -submodels[0].qualifiers[0].supplementalSemanticIds[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].qualifiers[0].supplementalSemanticIds: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/description.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/description.json.exception index caace89e..3dbc508a 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/description.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/description.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].description[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].description: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/displayName.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/displayName.json.exception index f416b3f4..3e49ade7 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/displayName.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/displayName.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].displayName[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].displayName: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/embeddedDataSpecifications.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/embeddedDataSpecifications.json.exception index e58207c3..fa18a450 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/embeddedDataSpecifications.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/embeddedDataSpecifications.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].embeddedDataSpecifications[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].embeddedDataSpecifications: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/extensions.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/extensions.json.exception index f4874863..9b31213d 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/extensions.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/extensions.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].extensions[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].extensions: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/qualifiers.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/qualifiers.json.exception index 44288000..d6807b6f 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/qualifiers.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/qualifiers.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].qualifiers[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].qualifiers: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/supplementalSemanticIds.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/supplementalSemanticIds.json.exception index dc98ea9c..86dee8b2 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/supplementalSemanticIds.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Range/supplementalSemanticIds.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].supplementalSemanticIds[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].supplementalSemanticIds: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Reference/keys.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Reference/keys.json.exception index 559f2196..df26fb1c 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Reference/keys.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Reference/keys.json.exception @@ -1 +1 @@ -assetAdministrationShells[0].derivedFrom.keys[0]: Expected a mapping, but got: \ No newline at end of file +assetAdministrationShells[0].derivedFrom.keys: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/description.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/description.json.exception index caace89e..3dbc508a 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/description.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/description.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].description[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].description: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/displayName.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/displayName.json.exception index f416b3f4..3e49ade7 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/displayName.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/displayName.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].displayName[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].displayName: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/embeddedDataSpecifications.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/embeddedDataSpecifications.json.exception index e58207c3..fa18a450 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/embeddedDataSpecifications.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/embeddedDataSpecifications.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].embeddedDataSpecifications[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].embeddedDataSpecifications: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/extensions.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/extensions.json.exception index f4874863..9b31213d 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/extensions.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/extensions.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].extensions[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].extensions: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/qualifiers.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/qualifiers.json.exception index 44288000..d6807b6f 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/qualifiers.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/qualifiers.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].qualifiers[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].qualifiers: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/supplementalSemanticIds.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/supplementalSemanticIds.json.exception index dc98ea9c..86dee8b2 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/supplementalSemanticIds.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ReferenceElement/supplementalSemanticIds.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].supplementalSemanticIds[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].supplementalSemanticIds: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/description.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/description.json.exception index caace89e..3dbc508a 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/description.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/description.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].description[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].description: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/displayName.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/displayName.json.exception index f416b3f4..3e49ade7 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/displayName.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/displayName.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].displayName[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].displayName: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/embeddedDataSpecifications.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/embeddedDataSpecifications.json.exception index e58207c3..fa18a450 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/embeddedDataSpecifications.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/embeddedDataSpecifications.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].embeddedDataSpecifications[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].embeddedDataSpecifications: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/extensions.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/extensions.json.exception index f4874863..9b31213d 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/extensions.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/extensions.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].extensions[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].extensions: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/qualifiers.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/qualifiers.json.exception index 44288000..d6807b6f 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/qualifiers.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/qualifiers.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].qualifiers[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].qualifiers: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/supplementalSemanticIds.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/supplementalSemanticIds.json.exception index dc98ea9c..86dee8b2 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/supplementalSemanticIds.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/RelationshipElement/supplementalSemanticIds.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].supplementalSemanticIds[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].supplementalSemanticIds: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SpecificAssetId/supplementalSemanticIds.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SpecificAssetId/supplementalSemanticIds.json.exception index 4a30fe3c..a4cabd70 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SpecificAssetId/supplementalSemanticIds.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SpecificAssetId/supplementalSemanticIds.json.exception @@ -1 +1 @@ -assetAdministrationShells[0].assetInformation.specificAssetIds[0].supplementalSemanticIds[0]: Expected a mapping, but got: \ No newline at end of file +assetAdministrationShells[0].assetInformation.specificAssetIds[0].supplementalSemanticIds: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/description.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/description.json.exception index daa966a3..238efabd 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/description.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/description.json.exception @@ -1 +1 @@ -submodels[0].description[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].description: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/displayName.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/displayName.json.exception index 33741430..f01ff75f 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/displayName.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/displayName.json.exception @@ -1 +1 @@ -submodels[0].displayName[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].displayName: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/embeddedDataSpecifications.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/embeddedDataSpecifications.json.exception index 361437a4..507bbbb1 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/embeddedDataSpecifications.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/embeddedDataSpecifications.json.exception @@ -1 +1 @@ -submodels[0].embeddedDataSpecifications[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].embeddedDataSpecifications: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/extensions.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/extensions.json.exception index 9d1c2f82..43135708 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/extensions.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/extensions.json.exception @@ -1 +1 @@ -submodels[0].extensions[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].extensions: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/qualifiers.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/qualifiers.json.exception index cfa19c20..dbe0f854 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/qualifiers.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/qualifiers.json.exception @@ -1 +1 @@ -submodels[0].qualifiers[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].qualifiers: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/submodelElements.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/submodelElements.json.exception index cde47c3a..7762c19e 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/submodelElements.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/submodelElements.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/supplementalSemanticIds.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/supplementalSemanticIds.json.exception index 94781937..0bf29925 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/supplementalSemanticIds.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/Submodel/supplementalSemanticIds.json.exception @@ -1 +1 @@ -submodels[0].supplementalSemanticIds[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].supplementalSemanticIds: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/description.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/description.json.exception index caace89e..3dbc508a 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/description.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/description.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].description[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].description: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/displayName.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/displayName.json.exception index f416b3f4..3e49ade7 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/displayName.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/displayName.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].displayName[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].displayName: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/embeddedDataSpecifications.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/embeddedDataSpecifications.json.exception index e58207c3..fa18a450 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/embeddedDataSpecifications.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/embeddedDataSpecifications.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].embeddedDataSpecifications[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].embeddedDataSpecifications: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/extensions.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/extensions.json.exception index f4874863..9b31213d 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/extensions.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/extensions.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].extensions[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].extensions: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/qualifiers.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/qualifiers.json.exception index 44288000..d6807b6f 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/qualifiers.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/qualifiers.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].qualifiers[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].qualifiers: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/supplementalSemanticIds.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/supplementalSemanticIds.json.exception index dc98ea9c..86dee8b2 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/supplementalSemanticIds.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/supplementalSemanticIds.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].supplementalSemanticIds[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].supplementalSemanticIds: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/value.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/value.json.exception index 9fa23806..61127567 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/value.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementCollection/value.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].value[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].value: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/description.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/description.json.exception index caace89e..3dbc508a 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/description.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/description.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].description[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].description: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/displayName.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/displayName.json.exception index f416b3f4..3e49ade7 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/displayName.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/displayName.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].displayName[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].displayName: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/embeddedDataSpecifications.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/embeddedDataSpecifications.json.exception index e58207c3..fa18a450 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/embeddedDataSpecifications.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/embeddedDataSpecifications.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].embeddedDataSpecifications[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].embeddedDataSpecifications: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/extensions.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/extensions.json.exception index f4874863..9b31213d 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/extensions.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/extensions.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].extensions[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].extensions: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/qualifiers.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/qualifiers.json.exception index 44288000..d6807b6f 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/qualifiers.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/qualifiers.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].qualifiers[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].qualifiers: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/supplementalSemanticIds.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/supplementalSemanticIds.json.exception index dc98ea9c..86dee8b2 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/supplementalSemanticIds.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/supplementalSemanticIds.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].supplementalSemanticIds[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].supplementalSemanticIds: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/value.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/value.json.exception index 9fa23806..61127567 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/value.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/SubmodelElementList/value.json.exception @@ -1 +1 @@ -submodels[0].submodelElements[0].value[0]: Expected a mapping, but got: \ No newline at end of file +submodels[0].submodelElements[0].value: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ValueList/valueReferencePairs.json.exception b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ValueList/valueReferencePairs.json.exception index 862a8510..7935e59a 100644 --- a/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ValueList/valueReferencePairs.json.exception +++ b/test_data/Json/ContainedInEnvironment/Unexpected/Unserializable/TypeViolation/ValueList/valueReferencePairs.json.exception @@ -1 +1 @@ -assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.valueList.valueReferencePairs[0]: Expected a mapping, but got: \ No newline at end of file +assetAdministrationShells[0].embeddedDataSpecifications[0].dataSpecificationContent.valueList.valueReferencePairs: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/SelfContained/Unexpected/Unserializable/TypeViolation/Environment/assetAdministrationShells.json.exception b/test_data/Json/SelfContained/Unexpected/Unserializable/TypeViolation/Environment/assetAdministrationShells.json.exception index ff1e3f1c..25b6635e 100644 --- a/test_data/Json/SelfContained/Unexpected/Unserializable/TypeViolation/Environment/assetAdministrationShells.json.exception +++ b/test_data/Json/SelfContained/Unexpected/Unserializable/TypeViolation/Environment/assetAdministrationShells.json.exception @@ -1 +1 @@ -assetAdministrationShells[0]: Expected a mapping, but got: \ No newline at end of file +assetAdministrationShells: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/SelfContained/Unexpected/Unserializable/TypeViolation/Environment/conceptDescriptions.json.exception b/test_data/Json/SelfContained/Unexpected/Unserializable/TypeViolation/Environment/conceptDescriptions.json.exception index 2360f8a8..b5ff2b7c 100644 --- a/test_data/Json/SelfContained/Unexpected/Unserializable/TypeViolation/Environment/conceptDescriptions.json.exception +++ b/test_data/Json/SelfContained/Unexpected/Unserializable/TypeViolation/Environment/conceptDescriptions.json.exception @@ -1 +1 @@ -conceptDescriptions[0]: Expected a mapping, but got: \ No newline at end of file +conceptDescriptions: Expected something array-like, but got: \ No newline at end of file diff --git a/test_data/Json/SelfContained/Unexpected/Unserializable/TypeViolation/Environment/submodels.json.exception b/test_data/Json/SelfContained/Unexpected/Unserializable/TypeViolation/Environment/submodels.json.exception index 5888f886..578322a1 100644 --- a/test_data/Json/SelfContained/Unexpected/Unserializable/TypeViolation/Environment/submodels.json.exception +++ b/test_data/Json/SelfContained/Unexpected/Unserializable/TypeViolation/Environment/submodels.json.exception @@ -1 +1 @@ -submodels[0]: Expected a mapping, but got: \ No newline at end of file +submodels: Expected something array-like, but got: \ No newline at end of file diff --git a/tests/test_jsonization_and_is_array_like.py b/tests/test_jsonization_and_is_array_like.py new file mode 100644 index 00000000..ee6fb2a2 --- /dev/null +++ b/tests/test_jsonization_and_is_array_like.py @@ -0,0 +1,34 @@ +# pylint: disable=missing-docstring + +# NOTE (mristin): +# We explicitly check that dictionaries are not mistaken for array-like objects during +# the de-serialization. +# +# This is a regression test for the following issue: +# https://github.com/aas-core-works/aas-core3.0-python/issues/31 + +import unittest +from typing import Optional + +import aas_core3.jsonization as aasjsonization + + +class TestIsArrayLike(unittest.TestCase): + def test_example(self) -> None: + jsonable = {"submodels": {}} # type: aasjsonization.Jsonable + + got_exception = None # type: Optional[aasjsonization.DeserializationException] + + try: + _ = aasjsonization.environment_from_jsonable(jsonable) + except aasjsonization.DeserializationException as exception: + got_exception = exception + + assert got_exception is not None + self.assertEqual( + "Expected something array-like, but got: ", str(got_exception) + ) + + +if __name__ == "__main__": + unittest.main()