Start a new topic

Error Reporting Regarding Target API Documentation

Error Reporting Regarding Target API Documentation


Greetings,
Its Floyd here. I am going through with documentation of Target API and I found samples of Request and Response Method of the API (Java). The example of request is quite clear but I think that the example mentioned for response is having some kind of mistake. The sample JSON structure of response example is giving an error on line # 2, right after a colon(:).

P.S: Links of the documentation is:

1. Request: http://www.wikitude.com/external/doc/documentation/latest/targetsapi/cloud-target-api.html#request
2. Response: http://www.wikitude.com/external/doc/documentation/latest/targetsapi/cloud-target-api.html#response

Hi Floyd,

we rechecked the Java example from here: https://github.com/Wikitude/wikitude-targets-api-samples and can confirm that they are working. Are you seeing a 403 error? This might indicate that you try to convert more than one image at once (which is not allowed with the trial license.) What exact error message are you seeing?

Hi Philipp,

Actually I am using retrofit2 library for request and response process. The sample response structure (in JSON) which you have mentioned in documentation is giving me an error when I am making schema of the response. Your sample JSON structure of response from this link.

This is your sample JSON structure:

Link: https://drive.google.com/open?id=0ByWvXROiB3cYUEdGY1dZeVJUbWs

 

When I am using this sample structure I am getting following error:

1. By using http://www.jsonschema2pojo.org/

Link: https://drive.google.com/open?id=0ByWvXROiB3cYSTJnanJiV0hMeUk

2. By using http://www.jsoneditoronline.org/

Link: https://drive.google.com/open?id=0ByWvXROiB3cYR3BjYURRM3RGelU

Thanks for poiting out,  the the JSON response there is not valid formed JSON. Correctly it needs to be:
 

{

"wtc": {

"url": "http://myUrl.com/myFile.wtc",

"generationTime": 0.1234,

"generationTimeUnit": "seconds",

"timeStamp": 123456789,

"targets":

}

}
Login or Signup to post a comment