Skip to content

Commit

Permalink
Create method to json (#6111)
Browse files Browse the repository at this point in the history
  • Loading branch information
b1rdG authored May 15, 2020
1 parent 2dd5477 commit 942035a
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 942035a

Please sign in to comment.