Skip to content

Escaped Json when using Gson #619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nicofari opened this issue Apr 26, 2020 · 3 comments
Closed

Escaped Json when using Gson #619

nicofari opened this issue Apr 26, 2020 · 3 comments

Comments

@nicofari
Copy link

Hello
I have a Spring Boot (latest version at the moment 2.2.6) in which I disabled Jackson to use Gson. As a final step I added springdoc-openapi to have the nice auto-generated open-api docs.
But then, surprise, the api-docs json is escaped. After digging and searching it seems to me that the spring-doc code is heavilty bound to Jackson.
Am I right? Or is there a way to solve this problem maintaing Gson as default converter in my app?
Or do i need to come back to Jackson?
Thanks a lot
Nicola

@bnasslahsen
Copy link
Collaborator

Hi @nicofari,

springdoc-openapi, depends on swagger-core project:

swagger-core, is based on jackson. so in order to to have things work, you will need jackson.

@bnasslahsen
Copy link
Collaborator

bnasslahsen commented Apr 28, 2020

Hi @nicofari,

It seems you having the same problem here: #624.
You can test with v1.35 which might be helpful in your case as well and give us your feedback.

@nicofari
Copy link
Author

Hi @bnasslahsen
for this project I reverted back to Jackson, and sorry I don't have time to come back to Gson again.
But I will certainly test it on the next project.
Thanks
Nicola

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

No branches or pull requests

2 participants