Skip to content

Instantly share code, notes, and snippets.

@fredgrott
Created April 10, 2024 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fredgrott/718779a368e348ffe125f06235b3d0f6 to your computer and use it in GitHub Desktop.
Save fredgrott/718779a368e348ffe125f06235b3d0f6 to your computer and use it in GitHub Desktop.
data class using json helper
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