Commit 228538cf authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Forward-port: Alias Dump/Load functions in ganeti.serializer to DumpJson/LoadJson

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
parent 783583e9
......@@ -39,7 +39,7 @@ except TypeError:
_RE_EOLSP = re.compile('\s+$', re.MULTILINE)
def Dump(data):
def DumpJson(data):
"""Serialize a given object.
......@@ -53,8 +53,12 @@ def Dump(data):
return txt
def Load(txt):
def LoadJson(txt):
"""Unserialize data from a string.
return simplejson.loads(txt)
Dump = DumpJson
Load = LoadJson
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment