I follow the direction below, as recommended by Looker, to generate my Java SDK:
I am able to successfully call on allLooks(), and runLook() just fine. However, when I call on look(), I am getting this exception:
com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.String out of START_OBJECT token
at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@3b77a04f; line: 1, column: 3798] (through reference chain: io.swagger.client.model.LookWithQuery[“query”]->io.swagger.client.model.Query[“vis_config”])
My sample Java code:
private void resetFilters(LookApi lookApi, ArrayList<LooksData> looks) {
try {
LookWithQuery thisLook = lookApi.look(Long.valueOf(50), null);
} catch (Exception e) {
System.out.println("Exception: " + e);
}
}
I looked at the generated Java classes and it appeared that the LookWithQuery class contains Query which has visConfig defined as:
private Map<String, String> visConfig = new HashMap<String, String>();
I am thinking that may be the exception is resulted from the returned json containing visConfig not being a map of String,String?
Has anyone see this error before?