The remote API will use JSON for the foreseable future, so it's better
to put the serialization format in the function name. We can still
use another serialization format for Ganeti's core.
Reviewed-by: amishchenko, schreiberal
_RE_EOLSP = re.compile('\s+$', re.MULTILINE)
-def Dump(data):
+def DumpJson(data):
"""Serialize a given object.
"""
return txt
-def Load(txt):
+def LoadJson(txt):
"""Unserialize data from a string.
"""
return simplejson.loads(txt)
+
+
+Dump = DumpJson
+Load = LoadJson