Skip to content

Cannot add optional parameters to the server method #32

@nk1973

Description

@nk1973

I see such limitation in the lib (may be i miss something).

  1. According to spec: http://www.jsonrpc.org/specification#request_object
    request params may be omitted.
  2. i want to implement method that take optional parameters, - that is the client can omit them in run time. For example method
    GetLog(optional filter1, optional filter2,...).
    So in one run the client can use GetLog(time filter)
    like this
    {"jsonrpc": "2.0", "method": "GetLog", "params": ["2013/12/00:00:00"], "id": 1}
    In the other without any filter (according to the spec this seems to be OK)
    {"jsonrpc": "2.0", "method": "GetLog", "id": 1}

But i don't see how i implement this with the lib (something like c++ overloading).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions