You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bazarr/libs/plex/serializer.py

18 lines
351 B

6 years ago
import jsonpickle
class Serializer(object):
@classmethod
def encode(cls, value):
return jsonpickle.encode(value)
@classmethod
def decode(cls, value, client=None):
try:
result = jsonpickle.decode(value)
result.client = client
return result
except:
return None