|
July 15, 2010, 12:31:14 AM Last edit: July 15, 2010, 12:49:09 AM by martin |
|
Thanks theymos.
I'm back at my development machine now, and I've successfully got a java applet communicating with the client via the Json Rpc. I wonder if you could help me with some specifics of the API?
Sending a string like this to the server:
{"jsonrpc": "2.0", "id":"json test", "method": "getinfo", "params": [] }
Returns a response like this:
{"result":{"balance": 0.00000000000000,"blocks":67486,"connections":8,"proxy":"","generate":true,"genproclimit":4,"difficulty":45.38582234101263},"error":null,"id":"json test"}
All well and good. However, sending a string like this:
{"jsonrpc": "2.0", "id":"send money to testaddress from web ui", "method": "sendtoaddress", "params": [1DoMXge6kToHZN8m4B2my43anCPbD4rJgE, 0.25] }
Gets me a http 500 error, which isn't great. Is my string malformed in some way?
EDIT:: Fixed, of course the bitcoin address is a string, and I wasn't enclosing it in quotes, silly me.
|