Skip to content

xmlMapper.readValue( xmlString , Bean.class ) for Single Boolean Value does not get the value defaults with false #641

@sandeepGenz

Description

@sandeepGenz

Let say there is a class Bean.java

public class Bean{
    boolean isAlive();
}

and there is a xmlString which has the above isAlive field with the value , now i need to parse this xml and store it into a java object,

but when i do xmlMapper.readValue( xmlString , Bean.class); if the isAlive() field in xmlString is true , but after deserializing through this above code , the value taken from the xml defaults to false. hence noticed that for boolean values it always defaults to false.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions