Created
April 10, 2024 19:12
-
-
Save fredgrott/718779a368e348ffe125f06235b3d0f6 to your computer and use it in GitHub Desktop.
data class using json helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person extends Coding { | |
String name; | |
@override | |
void decode(KeyedArchive object) { | |
// must call super | |
super.decode(object); | |
name = object.decode("name"); | |
} | |
@override | |
void encode(KeyedArchive object) { | |
object.encode("name", name); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment