-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
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
feat: implement asset information serialisation #163
base: main
Are you sure you want to change the base?
feat: implement asset information serialisation #163
Conversation
fix: restore the previous state
@@ -1,5 +1,6 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a bug in the aas4j library, so the order of tests execution is important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be resolved now (see #157)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be resolved now (see #157)
@@ -123,7 +123,7 @@ public void deserializeAASFullConceptDescription() throws FileNotFoundException, | |||
@Test | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you uncomment this line, the test will fail. This is a illustration of the bug: the XML serializer modifies the serialized object.
@@ -72,4 +72,18 @@ | |||
<artifactId>jackson-core</artifactId> | |||
</dependency> | |||
</dependencies> | |||
<build> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed to ensure the execution of the tests in the given order (XMLSerializerTest should be at the end)
No description provided.