def serialize(self, data):
        if data is None:
            return None
        elif type(data) is dict:
            return serializer.Serializer().serialize(data)
        else:
            raise Exception(_("Unable to serialize object of type = '%s'") %
                            type(data))
Serializes a dictionary into JSON.
dataset/ETHPy150Open openstack/python-group-based-policy-client/gbpclient/v2_0/client.py/Client.serialize