gorilla/rpc

Named parameters don't work

rodriguise opened this issue · 2 comments

{
"jsonrpc": "2.0",
"id": 0,
"method": "member.Create",
"params": {
"type": "foo"
}
}

results in:

{"result":null,"error":"json: cannot unmarshal object into Go value of type [1]interface {}","id":0}

this works:

{
"jsonrpc": "2.0",
"id": 0,
"method": "member.Create",
"params": [{
"type": "foo"
}]
}

the spec does not require params to be an array.

It works when using github.com/gorilla/rpc/v2/json2 instead of github.com/gorilla/rpc/v2/json

Closing due to inactivity.