feat: implement asset information serialisation#163
Conversation
fix: restore the previous state
| @@ -1,5 +1,6 @@ | |||
| /* | |||
There was a problem hiding this comment.
I have decided that it is better to decrease the class visibility to package-private. In such way the class is visible only from dataformat-json project. But it needs to be in the same package as ObjectMapperFactory.
| @@ -0,0 +1,97 @@ | |||
| package org.eclipse.digitaltwin.aas4j.v3.dataformat.json; | |||
There was a problem hiding this comment.
In my opinion the ObjectMapper created by this class can fully replace the JsonSerializer and JsonDeserializer.
| @@ -0,0 +1,15 @@ | |||
| package org.eclipse.digitaltwin.aas4j.v3.dataformat.xml; | |||
There was a problem hiding this comment.
There is a bug in the aas4j library, so the order of tests execution is important.
| public void deserializeAASWithExtensionMinimal() throws SerializationException, SAXException, FileNotFoundException, DeserializationException { | ||
| Environment env = new XmlDeserializer().read(XmlSerializerTest.AAS_WITH_EXTENSION_MINIMAL); | ||
|
|
||
| //String xml = new XmlSerializer().write(env); |
There was a problem hiding this comment.
If you uncomment this line, the test will fail. This is a illustration of the bug: the XML serializer modifies the serialized object.
| <artifactId>jackson-core</artifactId> | ||
| </dependency> | ||
| </dependencies> | ||
| <build> |
There was a problem hiding this comment.
This is needed to ensure the execution of the tests in the given order (XMLSerializerTest should be at the end)
|
Is this still active / relevant? Please update headline and content of PR as its not clear |
|
AssetInformation de-/serialization already present in current code. Update PR to only include additional unit tests. |
No description provided.