We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I have a property that is defined as a numeric type, the json serialization serialize it as numeric but it should be a string.
prop = aas_types.Property(id_short="Weight", value=1, value_type=aas_types.DataTypeDefXSD.DOUBLE) print(json.dumps(aas_jsonization.to_jsonable(prop),indent=2))
output is:
{ "idShort": "Weight", "valueType": "xs:double", "value": 1, "modelType": "Property" }
but should be:
{ "idShort": "Weight", "valueType": "xs:double", "value": "1", "modelType": "Property" }
SDK detail version: Python Version: 1.0.0rc3
The text was updated successfully, but these errors were encountered:
Hi @mhrimaz , We do not implement runtime type guards by design. Please run mypy on your code to avoid such bugs.
mypy
Btw., this is true for all attriputes, not only Property.value.
Property.value
Sorry, something went wrong.
I'm reopening the issue as this design decision has not been properly documented.
The design decision has been properly documented in: aas-core-works/aas-core3.0-python#14
Thanks again for reporting, @mhrimaz !
Successfully merging a pull request may close this issue.
When I have a property that is defined as a numeric type, the json serialization serialize it as numeric but it should be a string.
output is:
but should be:
SDK detail version: Python Version: 1.0.0rc3
The text was updated successfully, but these errors were encountered: