def json_to_initkwargs ( self , json_data , kwargs ) : if isinstance ( json_data , basestring ) : json_data = json . loads ( json_data ) return json_to_initkwargs ( self , json_data , kwargs )
python turn init args into kwargs
Subclassing hook to specialize how JSON data is converted to keyword arguments
def json_to_initkwargs(self, json_data, kwargs):
        """Subclassing hook to specialize how JSON data is converted
        to keyword arguments"""
        if isinstance(json_data, basestring):
            json_data = json.loads(json_data)
        return json_to_initkwargs(self, json_data, kwargs)