combining lines
#1
Was wondering if some one could tell me if its possible to combined the three samples into one command?

{"jsonrpc": "2.0", "method": "Player.GetActivePlayers", "id": 1}

{"jsonrpc":"2.0","method":"Player.GetProperties","params":{"playerid":0,"properties":["speed","percentage","totaltime","time"]},"id":1}

{"jsonrpc":"2.0","method":"Player.GetItem","params":{"playerid":0,"properties":["title", "album", "artist"]},"id":1}


Thanks,
Mike
Reply
#2
Well you can't combine 1 and 2/3 since 2/3 depends on the result of 1 Smile

For 2/3 check Batch commands on the JSON Wiki
Reply
#3
The json wiki does not give example on how to do this, I can only find one part that says it can be done, and hep would be greatly appreciated on how to combine line 2 and 3.
Reply
#4
Well the Wiki also explains that JSON RPC is indeed JSON RPC Smile

So a simple google gives : http://www.jsonrpc.org/specification

Just add [] over the queries separated with , there's dozens of sample in this sub forum.
Reply
#5
I,m lost been looking at this for hours and can't find an answer, that's why I am here. I am completely new to json. If its that easy can't you just copy and paste my to example to show me how?
Reply
#6
Seriously ? You need me to add 3 char to you request and read a documentation that present samples ?

You may want to stop what you are doing as you do not really seems prepared for that Smile


Code:
[
{"jsonrpc":"2.0","method":"Player.GetProperties","params":{"playerid":0,"properties":["speed","percentage","totaltime","time"]},"id":1}
,
{"jsonrpc":"2.0","method":"Player.GetItem","params":{"playerid":0,"properties":["title", "album", "artist"]},"id":2}
]

You of course need a proper handling of the answer if needed.
Reply
#7
Thank you for your hard work to show that to me. I'm sure it took a lot of energy for you to do that. Like I said, I am very new to this and just needed a few commands for iRule, Before you insult some one that is simple asking question, you may want to stop and say, "hey what is easy for me may not be easy for some one else." How else do you learn, besides, reading. You ask questions.

Thanks
Reply
#8
Well reading your previous posts I can only say :

"Give a man a fish and you feed him for a day, Teach a man to fish and you feed him for a lifetime"

If you can't understand something it's better to show you how to understand it, than giving you the solution, else you'll pass your life begging for solutions.
Reply

Logout Mark Read Team Forum Stats Members Help
combining lines0