Skip to content

Is it possible to completely ignore namespaces during deserialization? #170

@lamba92

Description

@lamba92

I have my data class that has:

@Serializable
@XmlSerialName(
    value = "project",
    namespace = POM_XML_NAMESPACE,
)
data class ProjectObjectModel(...)

But, some very old pom.xml do not provide any namespace at all! For example ch.qos.logback:logback-parent:0.9.7 starts with:

<?xml version="1.0"?><project>
  <parent>
    <artifactId>logback-parent</artifactId>
    <groupId>ch.qos.logback</groupId>
    <version>0.9.7</version>
  </parent>
  ...

Nowadays it is not really needed to add all this metadata since the classes themselves in which one is deserializing are the specifications! It either fits them or not.

Would it be possible to ignore errors like this one?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions