protostuff icon indicating copy to clipboard operation
protostuff copied to clipboard

protostuff not support Deprecated ?

Open lmlsky opened this issue 4 years ago • 1 comments

when I use protostuff serialize ,the Deprecated field can't deserialize

the vo like this ,field mail can't deserialize @Data @ToString @Builder @JsonIgnoreProperties(ignoreUnknown = true) public class UserVO implements Serializable { private static final long serialVersionUID = 1L; private long id; @JsonProperty("user_code") private String userCode; private String name; @Deprecated private String mail; }

lmlsky avatar Feb 24 '21 02:02 lmlsky

On Wed, Feb 24, 2021 at 10:53 AM lmlsky [email protected] wrote:

when I use protostuff serialize ,the Deprecated field can't deserialize

the vo like this ,field mail can't deserialize @DaTa https://github.com/DaTa @tostring https://github.com/tostring @builder https://github.com/builder @JsonIgnoreProperties https://github.com/JsonIgnoreProperties(ignoreUnknown = true) public class UserVO implements Serializable { private static final long serialVersionUID = 1L; private long id; @JsonProperty("user_code") private String userCode; private String name; @deprecated https://github.com/deprecated private String mail; }

Yes that is by design. See https://protostuff.github.io/docs/protostuff-runtime/

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/protostuff/protostuff/issues/310, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAATL67EPGXRJHYF5TYX3Q3TARSY3ANCNFSM4YDU6LHQ .

-- When the cat is away, the mouse is alone. dyuproject.com

dyu avatar Mar 02 '21 06:03 dyu