Named Parameters

37 views
Skip to first unread message

yama...@gmail.com

unread,
Jul 7, 2015, 4:27:35 PM7/7/15
to qjsonrpc-d...@googlegroups.com
What is necessary to have an rpc service function accept named parameters?

ie, if I have a service function:

QString RPCServiceClass::namedParameters(QString User, QString Date, QString Account, QString Amount);

If the incoming JSON request is formatted with named parameters instead of just "params":["1","2","3","4"], how do I parse through the parameters to ensure they're being assigned to the proper places inside of my service function?

Thanks in advance!

Will Navidson

unread,
Jul 7, 2015, 4:46:50 PM7/7/15
to qjsonrpc-d...@googlegroups.com
I apologize, as I should have looked a bit more into this before I posted the question.

The answer was fairly straightforward, that the named parameters will "automatically" work so long as the parameter names in the function match the names of the parameters entering it.

Reply all
Reply to author
Forward
0 new messages