-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
discussionIt's not clear yetIt's not clear yetsdkSomething to do with the `sdk` packageSomething to do with the `sdk` package
Description
I use this example code to create a ModelReference object for a submodel. Then I serialise the object as a JSON string.
Everything works so far.
However, when I try to deserialise the JSON string back into an object, the result is a dictionary, not a ModelReference object.
submodel = model.Submodel(id_="http://example.com/submodel/1", id_short="DemoSubmodel")
submodel_ref = model.ModelReference.from_referable(submodel)
data_string = json.dumps(submodel_ref, cls=basyx.aas.adapter.json.AASToJsonEncoder)
reference = json.loads(data_string, cls=basyx.aas.adapter.json.AASFromJsonDecoder)
For example, if I serialise and deserialise ModelReferences as part of a shell, everything works fine.
It seems that the issue only occurs with stand-alone ModelReferences.
Metadata
Metadata
Assignees
Labels
discussionIt's not clear yetIt's not clear yetsdkSomething to do with the `sdk` packageSomething to do with the `sdk` package