Closed the-nic closed 2 years ago
Yes, it's retrieving the value of the asset
property as a dict
in order to construct a Reference
object from the dict
. In the DotAAS metamodel, references to other objects are described by Reference
objects, which point to the actual object.
This is also the case for the asset
property of an AssetAdministrationShell
, you can verify it on page 234 of the spec: https://www.plattform-i40.de/IP/Redaktion/EN/Downloads/Publikation/Details_of_the_Asset_Administration_Shell_Part1_V2.pdf?__blob=publicationFile
Thus, the exemplary JSON structure you gave doesn't adhere to the DotAAS spec in version 2.0.1 and isn't compatible with this implementation.
Thank you very much for the explanation!
When parsing an AssetAdministrationShell from json
_construct_asset_administration_shell
is expecting a typedict
inasset
element:However, at that point the
asset
element is already parsed and fails with:Changing the above line to
seems to fix the problem.
Example python code: