bazarr/libs/plex/serializer.py
2018-10-31 17:08:29 +01:00

17 lines
351 B
Python

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