I don't understand what the ID is for in JSON RPC. Also, how bad is it considered to not use JSON-RPC.org's standards when developing a toolkit? There seems to be some ambiguity in the JSON-RPC world.
P.S. The ID I'm referring to is the id in here:
{"params":["Hello","World"],"method":"hello_world","id":1}
You can read the JSON RPC docment https://www.jsonrpc.org/specification. In the "4 Request object" the id param is explain clearly.
You're not guaranteed to get your answers back in the order you asked for them; the id is to help you sort that out.
The "id" is returned in the corresponding response object, so you can map one context to the other.
If you are making synchronous single calls, it might not make sense, but in an async multi-outstanding-call enviroment it is vital.
It should not be hard coded to 1, but set to a unique value for every request object you generate from the client.
None of the answers mentions the difference between the two existing versions of the protocol.
JSON RPC 1.0:
JSON RPC 2.0:
Thus it is perfectly fine in JSON RPC 2.0 to set id to some fixed value. But be aware of the use of id in batch requests.