golo-lang icon indicating copy to clipboard operation
golo-lang copied to clipboard

Make struct and union serializable

Open yloiseau opened this issue 8 years ago • 4 comments

It would be nice if golo struct and union types could be serializable.

yloiseau avatar Mar 06 '17 15:03 yloiseau

Not too hard either 😄

jponge avatar Mar 13 '17 20:03 jponge

hence the “newcomer” label :smile:

yloiseau avatar Mar 15 '17 09:03 yloiseau

Hi @yloiseau , Could you guide me how to get going on the issue.

imshashwataggarwal avatar Mar 22 '17 11:03 imshashwataggarwal

Hi @imshashwataggarwal. If you're not familiar with Java serialization process, you can check Discover the secrets of the Java Serialization API. Basically, the struct generated classes must implement Serializable. A serialVersionUID should be generated, e.g. from the hash of GoloStruct and the struct members. Another aspect is the transient fields. Maybe a convention based name (like for private ones, e.g. prefixing a transient field with __) would be enough.

yloiseau avatar Apr 04 '17 14:04 yloiseau