1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-30 19:46:25 +00:00
bazarr/libs/plex/serializer.py

18 lines
351 B
Python
Raw Normal View History

2018-10-31 16:08:29 +00:00
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