2011-05-10, 19:53
So I'm trying to get my Java app to use the JSON stuff and I'm having trouble. I've tested the setup with "Simple REST Client" in Chrome and it works great.
URL = http://localhost:8080/jsonrpc
Message = {\"jsonrpc\": \"2.0\", \"method\": \"AudioPlayer.PlayPause\", \"id\": 1}
Print out of message being sent = {"jsonrpc": "2.0", "method": "AudioPlayer.PlayPause", "id": 1}
And when I try this, I get this:
What am I doing wrong?
URL = http://localhost:8080/jsonrpc
Message = {\"jsonrpc\": \"2.0\", \"method\": \"AudioPlayer.PlayPause\", \"id\": 1}
Print out of message being sent = {"jsonrpc": "2.0", "method": "AudioPlayer.PlayPause", "id": 1}
And when I try this, I get this:
Code:
{
"error" : {
"code" : -32700,
"message" : "Parse error."
},
"id" : 0,
"jsonrpc" : "2.0"
}
What am I doing wrong?