Did I find the right examples for you? yes no

All Samples(13)  |  Call(6)  |  Derive(1)  |  Import(6)

src/d/o/dodai-compute-HEAD/nova/api/openstack/faults.py   dodai-compute(Download)
        serializer = {
            'application/xml': xml_serializer,
            'application/json': wsgi.JSONDictSerializer(),
        }[content_type]
 
        serializer = {
            'application/xml': xml_serializer,
            'application/json': wsgi.JSONDictSerializer(),
        }[content_type]
 

src/c/i/cimi-HEAD/cimi/cimiapp/cimibase.py   cimi(Download)
from webob import Request
from nova.openstack.common import log as logging
from nova.api.openstack.wsgi import XMLDictSerializer, JSONDictSerializer
from nova.api.openstack.wsgi import XMLDeserializer, JSONDeserializer
from cimiutils import best_match
class CimiJSONDictSerializer(JSONDictSerializer):
    """Default JSON request body serialization"""
 
    def default(self, data):
        return json.dumps(data, indent=2)

src/d/o/dodai-compute-HEAD/nova/api/direct.py   dodai-compute(Download)
            serializer = {
              'application/xml': nova.api.openstack.wsgi.XMLDictSerializer(),
              'application/json': nova.api.openstack.wsgi.JSONDictSerializer(),
            }[content_type]
            return serializer.serialize(result)

src/c/i/cimi-HEAD/cimi/cimiapp/volume.py   cimi(Download)
from cimiutils import concat, get_err_response, map_volume_state
from cimiutils import match_up, sub_path, access_resource, has_extra
from nova.api.openstack.wsgi import XMLDictSerializer, JSONDictSerializer
 
LOG = logging.getLogger(__name__)

src/c/i/cimi-HEAD/cimi/cimiapp/network.py   cimi(Download)
from cimiutils import concat, get_err_response
from cimiutils import match_up, sub_path
from nova.api.openstack.wsgi import XMLDictSerializer, JSONDictSerializer
 
LOG = logging.getLogger(__name__)

src/c/i/cimi-HEAD/cimi/cimiapp/machinevolume.py   cimi(Download)
from cimiutils import match_up, sub_path
from cimiutils import remove_member, access_resource, map_volume_state
from nova.api.openstack.wsgi import XMLDictSerializer, JSONDictSerializer
 
LOG = logging.getLogger(__name__)

src/c/i/cimi-HEAD/cimi/cimiapp/machine.py   cimi(Download)
from cimiutils import match_up, sub_path, access_resource
from cimiutils import remove_member, map_machine_state
from nova.api.openstack.wsgi import XMLDictSerializer, JSONDictSerializer
 
LOG = logging.getLogger(__name__)

src/c/i/cimi-HEAD/cimi/cimiapp/address.py   cimi(Download)
import copy
 
from nova.api.openstack.wsgi import XMLDictSerializer, JSONDictSerializer
 
from cimibase import Controller, Consts

src/n/o/nova-HEAD/nova/tests/api/openstack/test_wsgi.py   nova(Download)
    def test_json(self):
        input_dict = dict(servers=dict(a=(2, 3)))
        expected_json = '{"servers":{"a":[2,3]}}'
        serializer = wsgi.JSONDictSerializer()
        result = serializer.serialize(input_dict)

src/n/o/nova-gce-HEAD/nova/tests/api/openstack/test_wsgi.py   nova-gce(Download)
    def test_json(self):
        input_dict = dict(servers=dict(a=(2, 3)))
        expected_json = '{"servers":{"a":[2,3]}}'
        serializer = wsgi.JSONDictSerializer()
        result = serializer.serialize(input_dict)

  1 | 2  Next