def getparser(self):
        parser, unmarshaller = Transport.getparser(self)
        dispatch = unmarshaller.dispatch.copy()
        unmarshaller.dispatch = dispatch
        # Now we can add custom types
        dispatch["ex:nil"] = dispatch["nil"]
        dispatch["ex:i2"] = dispatch["int"]
        dispatch["ex:i4"] = dispatch["int"]
        dispatch["ex:i8"] = dispatch["int"]

        return parser, unmarshaller
Пример #2
0
    def getparser(self):
        parser, unmarshaller = Transport.getparser(self)
        dispatch = unmarshaller.dispatch.copy()
        unmarshaller.dispatch = dispatch
        # Now we can add custom types
        dispatch["ex:nil"] = dispatch["nil"]
        dispatch["ex:i2"]  = dispatch["int"]
        dispatch["ex:i4"]  = dispatch["int"]
        dispatch["ex:i8"]  = dispatch["int"]
 
        return parser, unmarshaller                                                                                                                                                                                                                                                                                                                              
Пример #3
0
 def getparser(self):
     if self.protocol == 'json':
         parser = DummyParser()
         return parser, parser
     else:
         return Transport.getparser(self)
Пример #4
0
 def getparser(self):
     if self.protocol == 'json':
         parser = DummyParser()
         return parser, parser
     else:
         return Transport.getparser(self)