Json parameters are passed as null

I am calling the method like this:

Headers:

User-Agent: Fiddler
Content-type: application/json
Content-length: 116
Host: localhost:1234

      

POST method, URL:

http://localhost:1234/MyService.svc/json/MyMethod

      

Parameters:

{"email":"here@hotmail.com","json":{"array1":[],"array2":[],"array3":[]}}

      

Here is the method signature:

public Result MyMethod(string email, Dictionary<string, object> json)

      

The method is called. email is ok but json is null. Why?

0


source to share


1 answer


I created a new class that had the following properties: List, List, List, and I changed the method:

public void MyMethod(string email, theNewClass json) ;

      



and it worked.

0


source







All Articles