the manner of action of scala @Serializable is different from Java Serializable?
I mean the way to serialize objects or both use the same standard serialization?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well Scala compiles to JVM byte code, so the only difference comes from how Scala implements this conversion. Scala converts the annotation to the interface during type checking which can lead to some subtle problems see here.
Afaik @Serializable is deprecated anyhow – compared to other annotations (volatile annotation instead of a specifier) in scala I don’t see much advantages anyhow.. doesn’t make the code much clearer or simpler.