Astn/JSON-RPC.NET

How to generate the JSON text with named parameters?

jdengitw opened this issue · 4 comments

Hello,
My JSON text is with positional parameters now, I'm going to change it to named parameters. Is there a function I can call or I need to implement it by myself?
Thanks.

example:
What I have now.
image
What I want.
image

Astn commented

There is nothing extra you should need to do. Just try switching one of your calls to use named parameters and it should work. Both calling styles should work at the same time.

Any code in your client you need to write your self.

I don't understand this part of your question:

Is there a function I can call or I need to implement it by myself?

A function for what, or implement what your self?

Thank you for the quick reply.
I mean do I need to modify the class JsonRequest?

Astn commented

It's automatic.
You don't need to do anything different on the server. Just on the client send the request using the object style instead of the array style.

Thanks very much.