Level: Beginner
Hello all,
I am very new to JSON world and I have a confusion.
I am working on an API which states that I can get some information from the server by using JSON's callback function.
The API document gives a response as in the example below:
It says I can get some information by sending a request to server like this: www.myserver.com/id?jsonpCallback=mycallback
Further more it says that the request structure will be as below:
{
"proto Version" : <String>,
"sVersion" : <String>,
"requestType" : <String>,
"requestData" : <DataModel>
}
and the response structure will be like below:
{
"protoVersion" : <String>,
"sVersion" : <String>,
"responseType" : <String>,
"responseErrorType" : <String>,
"responseErrorDetail" : <String>,
"responseData" : <DataModel>
}
My questions are the following:
- Where will this
mycallbackparameter will be defined? What could be the starting point? I guess I need to create a separate application that does this for me but not sure. - Do I need to craft my request and response too? If yes, then where?
- Can I craft a request like below?
www.myserver.com/id?jsonpCallback={"proto Version" :1.2, "sVersion":3, "requestType" :String, "requestData" :DataModel}
It would be great if someone can point me to a good tutorial. I plan to use python language. Thank you for your time.