Skip to content

Conversation

@emildinchev
Copy link
Contributor

No description provided.

@@ -1,5 +1,6 @@
/*
Copy link
Contributor Author

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;
Copy link
Contributor Author

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;
Copy link
Contributor Author

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.

Copy link
Contributor

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)

Copy link
Contributor

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)

public void deserializeAASWithExtensionMinimal() throws SerializationException, SAXException, FileNotFoundException, DeserializationException {
Environment env = new XmlDeserializer().read(XmlSerializerTest.AAS_WITH_EXTENSION_MINIMAL);

//String xml = new XmlSerializer().write(env);
Copy link
Contributor Author

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.

<artifactId>jackson-core</artifactId>
</dependency>
</dependencies>
<build>
Copy link
Contributor Author

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)

@sebbader-sap sebbader-sap marked this pull request as draft December 6, 2023 15:43
@twebermartins twebermartins added the enhancement New feature or request label Dec 6, 2023
@twebermartins
Copy link
Contributor

twebermartins commented Nov 19, 2024

Is this still active / relevant? Please update headline and content of PR as its not clear

@mjacoby
Copy link
Contributor

mjacoby commented Nov 11, 2025

AssetInformation de-/serialization already present in current code. Update PR to only include additional unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants