samuraisam / django-json-rpc

JSON-RPC Implementation for Django
MIT License
286 stars 83 forks source link

Is there a way to define an argument as optional? #45

Closed tuomassalo closed 11 years ago

tuomassalo commented 11 years ago

I'm using validate=True, but I would like to specify in the signature string that some of the arguments are optional. Is this possible? I'm using keyword arguments.

Something like @jsonrpc_method('my.method(arg1=String, [arg2=String])', validate=True).

samuraisam commented 11 years ago

No, but you could pass javascript null which will translate into python None

JSON-RPC does not have optional parameters.