dialogflow-java-client icon indicating copy to clipboard operation
dialogflow-java-client copied to clipboard

Avoid use of Gson library JsonElement

Open rhanton opened this issue 8 years ago • 1 comments

While some of the models in the client contain maps of <String, Object>, others use <String, JsonElement> which can cause problems if you have a conflicting JSON library like Jackson (we're using Spring Boot). Suggest swapping to a more generic Java Object, which will make the library models more usable on their own.

Classes affected (it appears) are AIOutputContext.java, Fulfillment.java, and Result.java.

rhanton avatar Aug 17 '17 17:08 rhanton

+1 I lost some time trying to make api-ai work with Spring Boot due to this issue. At the end I have found a workaround - switched the whole Spring Boot to use gson spring.http.converters.preferred-json-mapper=gson following https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html It would be better not to be forced to switch.

awal11 avatar Aug 20 '17 20:08 awal11