mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 22:57:56 -05:00
41 lines
830 B
Python
41 lines
830 B
Python
|
##
|
||
|
##
|
||
|
|
||
|
|
||
|
#
|
||
|
# TODO
|
||
|
#
|
||
|
#
|
||
|
# SOFTWARE HISTORY
|
||
|
#
|
||
|
# Date Ticket# Engineer Description
|
||
|
# ------------ ---------- ----------- --------------------------
|
||
|
# 08/20/10 njensen Initial Creation.
|
||
|
#
|
||
|
#
|
||
|
#
|
||
|
|
||
|
__all__ = [
|
||
|
]
|
||
|
|
||
|
import dstypes, adapters
|
||
|
import DynamicSerializationManager
|
||
|
|
||
|
class SerializationException(Exception):
|
||
|
|
||
|
def __init__(self, message=None):
|
||
|
self.message = message
|
||
|
|
||
|
def __str__(self):
|
||
|
if self.message:
|
||
|
return self.message
|
||
|
else:
|
||
|
return ""
|
||
|
|
||
|
def serialize(obj):
|
||
|
dsm = DynamicSerializationManager.DynamicSerializationManager()
|
||
|
return dsm.serializeObject(obj)
|
||
|
|
||
|
def deserialize(bytes):
|
||
|
dsm = DynamicSerializationManager.DynamicSerializationManager()
|
||
|
return dsm.deserializeBytes(bytes)
|