Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Avoid use of Gson library JsonElement #33

Open
rhanton opened this issue Aug 17, 2017 · 1 comment
Open

Avoid use of Gson library JsonElement #33

rhanton opened this issue Aug 17, 2017 · 1 comment

Comments

@rhanton
Copy link

rhanton commented Aug 17, 2017

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.

@awal11
Copy link

awal11 commented Aug 20, 2017

+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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants