Do you really need gson?
See original GitHub issueHello I’m building a spring-boot application and I have more than 400 dependencies. Out of those 400 dependencies only stripe is depending on gson
and spring-boot is smart enough to detect if you have a jackson
dependency or gson
dependency to detect which class to use so it actually works with both. I know it’s shit there’s no native json parser in Java and there might be one in Java 9 but until that happens do you think you might be able to support both jackson
and gson
and use it as compile-time dependency only?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Jackson vs Gson - Baeldung
Both Gson and Jackson are good options for serializing/deserializing JSON data, simple to use and well documented. Advantages of Gson:.
Read more >Benefits of GSON over normal JSON parse - Stack Overflow
The benefit you get with GSON is that object mapping can save the time spent writing code.
Read more >Two ways to use Gson for JSON in Java - Twilio
Gson allows you to read JSON into a tree model : Java objects that represent JSON objects, arrays and values. These objects are...
Read more >[2021 update] The Ultimate JSON Library: JSON.simple vs ...
GSON is a Java library that converts Java Objects into JSON and vice versa. It provides the added benefit of full support for...
Read more >Gson User Guide - Google Sites
Gson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
My problem is that i’m trying to keep my project as small as possible. Currently I’m using jackson for JSON serialization/deserialization, but now i have two dependencies - gson and jackson. What spring boot are doing is they are implementation agnostic - and i was wondering if it would be possible to use your API with jackson as well, and not dragging the gson dependency always.
Sorry for the bump on an old issue - just tagging this against our new top-level feature request for supporting Jackson.
https://github.com/stripe/stripe-java/issues/1344