Skip to content

Commit

Permalink
Fix serialization of Tuple (#446)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored Nov 17, 2020
1 parent 5d67174 commit 3572266
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions param/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,10 @@ def _validate(self, val):
(self.name,len(val),self.length))


@classmethod
def serialize(cls, value):
return list(value) # As JSON has no tuple representation

@classmethod
def deserialize(cls, value):
return tuple(value) # As JSON has no tuple representation
Expand Down

0 comments on commit 3572266

Please sign in to comment.