Skip to content

Commit

Permalink
Create method to json
Browse files Browse the repository at this point in the history
  • Loading branch information
b1rdG committed May 1, 2020
1 parent 001d9cb commit 2a1020c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ class {{classname}} {
static const {{classname}} {{{name}}} = const {{classname}}._internal({{{value}}});
{{/enumVars}}
{{/allowableValues}}

{{dataType}} toJson (){
return this.value;
}

static {{classname}} fromJson({{dataType}} value) {
return new {{classname}}TypeTransformer().decode(value);
Expand Down

0 comments on commit 2a1020c

Please sign in to comment.