History | View | Annotate | Download (1.6 kB)
serializer.DumpJson: Control indentation by parameter
If the simplejson module supports indentation, it's always used. Thereare cases where we might not want to use it or enable it only fordebugging purposes, such as in RPC.
Reviewed-by: iustinp
Make sure serialized data ends with EOL character
Also fix the regular expression to not remove newlines. The simplejsonmodule puts whitespace at line endings when using indentation. Removeunnecessary import of ConfigParser module.
Reviewed-by: ultrotter
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 betterto put the serialization format in the function name. We can stilluse another serialization format for Ganeti's core....
Abstract the json functions into a separate module
This simple patch adds a new module that holds the simplejson functionsfor serialization/deserialization. This reduces the amount of redundantcode.
The patch also adds some normalizations to the json output:...