I have an requirement to pass a some values from mobile to server in a web service call and so I am planning to pass all the values in JSON format like the below
<
As @RE350 suggested passing the JSON data in the body in the post would be ideal. However, you could still send the json object as a parameter in a GET request, decode the json string in the server-side logic and use it as an object.
For example, if you are on php you could do this (use the appropriate json decode in other languages):
Server request:
http://?param1={"nameservice":[{"id":89},{"id":3}]}
In the server:
$obj = json_decode($_GET['param1'], true);
$obj["nameservice"][0]["id"]
out put:
89