Skip to content

RPC id can be string according to JSONRPC specification #295

@jorisbontje

Description

@jorisbontje

with request:

POST / HTTP/1.1
Host: 127.0.0.1:8080
Content-Length: 106
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.5.1 CPython/2.7.8 Darwin/14.1.0
Connection: keep-alive
content-type: application/json

{"params": null, "jsonrpc": "2.0", "id": "5b659f5e-7a16-458b-9456-ce528e967229", 
"method": "eth_coinbase"}

error:

2015/02/06 10:34:46 [RPC] Error decoding JSON:  json: cannot unmarshal string into Go value
of type int

however according to http://www.jsonrpc.org/specification#request_object

id
An identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null [1] and Numbers SHOULD NOT contain fractional parts [2]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions