@Test void testUnknownPropertiesAreIgnoredWhenConfiguringLenientDeserialization() { testSubject = XStreamSerializer.builder() .lenientDeserialization() .build(); SerializedObject<Document> serialized = testSubject.serialize(testEvent, Document.class); Document data = serialized.getData(); data.getRootElement().addElement("unknown").setText("Ignored"); TestEvent actual = testSubject.deserialize(new SimpleSerializedObject<>(data, Document.class, serialized.getType())); assertEquals(testEvent, actual); }
public static Builder builder() { return new Builder(); }
XStreamSerializer extends AbstractXStreamSerializer { public static Builder builder() { return new Builder(); } }
XStreamSerializer extends AbstractXStreamSerializer { public static Builder builder() { return new Builder(); } protected  XStreamSerializer(Builder builder); }
XStreamSerializer extends AbstractXStreamSerializer { public static Builder builder() { return new Builder(); } protected  XStreamSerializer(Builder builder); static Builder builder(); static XStreamSerializer defaultSerializer(); @SuppressWarnings({"unchecked"}) @Override Object doDeserialize(SerializedObject serializedObject, XStream xStream); }
XStreamSerializer extends AbstractXStreamSerializer { public static Builder builder() { return new Builder(); } protected  XStreamSerializer(Builder builder); static Builder builder(); static XStreamSerializer defaultSerializer(); @SuppressWarnings({"unchecked"}) @Override Object doDeserialize(SerializedObject serializedObject, XStream xStream);  }