Closed NotJustAnna closed 4 years ago
Implemented a fix for #2 which is in the same method, so I appended it here.
Does "effectively" the same deserialization results mean different results? If so, when?
Does "effectively" the same deserialization results mean different results? If so, when?
It should not generate different results, but this account for cases the previous method doesn't cover.
Example code:
public class User {
private String name;
private LoginToken loginToken;
public LoginToken getLoginToken() { return loginToken; } // this is a getter
public void setLoginToken(LoginToken loginToken) { this.loginToken = loginToken; } // this is a setter
public static class LoginToken {
private String b64;
public String getB64() { return b64; }
public void setB64(String b64) { this.b64 = b64; }
}
}
Example serialized JSON:
{ name: "Adrian", loginToken: { b64: "SGkgSSdtIGFuIGVhc3RlciBlZ2ch", reset: 1581600000 } }
Example cases:
name
) but not a public setter for a property, previous code wouldn't find this case and JacksonXML would fail.loginToken
-> reset
), previous code wouldn't find this case and JacksonXML would fail.All previous code and serializations that already worked would keep working.
Jackson has a built-in feature which makes this irrelevant. The plain ObjectMapper can be used if an DeserializationFeature is disabled.