feiyuw / dubbo-py

Dubbo(Hessian2) protocol codec and provider/consumer library
BSD 2-Clause "Simplified" License
15 stars 4 forks source link

请问下支持json格式的参数吗 #1

Closed liboleo closed 4 years ago

feiyuw commented 5 years ago

是作为client吗?这个取决于Java server侧的参数类型,通常是object的话,需要通过new_object的方式构造,比如:

from dubbo.codec.hessian2 import new_object
from dubbo.client import DubboClient

client = DubboClient('127.0.0.1', 12358)
resp = client.send_request_and_return_response(service_name='com.myservice.object', method_name='test', args=[new_object('com.test.attr', name='test', title='hello world')])