You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Still there is an issue I'm facing every day which seems to have an easy solution.
Summary
Basically all I need is to be able to apply configuration to private GSON instance used internally. OR at least to make GSON builder to check if Joda-Time type adapters are available and auto-register them.
Use case
We use Joda-Time date types extensively in our services (well, primarily org.joda.time.DateTime).
When serialized by internal Shazamcrest GSON instance, it becomes a pages-long JSON structure that's really hard to read. Something like this:
And even worse: due to some bug in my IDE (IntelliJ IDEA) it puts into infinite loop on attempt to parse mismatch. Disclaimer: this is clearly IDE bug, not of library.
@kozlovda@nieldw
Can we add a Static method to the GsonProvider.registerCustomTypeAdapter();
This will allow a person to register one or more TypeAdapters that will be added GsonBuilder
Hi guys, great lib! :) Loving it!
Still there is an issue I'm facing every day which seems to have an easy solution.
Summary
Basically all I need is to be able to apply configuration to private GSON instance used internally. OR at least to make GSON builder to check if Joda-Time type adapters are available and auto-register them.
Use case
We use Joda-Time date types extensively in our services (well, primarily
org.joda.time.DateTime
).When serialized by internal Shazamcrest GSON instance, it becomes a pages-long JSON structure that's really hard to read. Something like this:
And even worse: due to some bug in my IDE (IntelliJ IDEA) it puts into infinite loop on attempt to parse mismatch. Disclaimer: this is clearly IDE bug, not of library.
Feature Request
So it would be wonderful if we could just have some access to the GSON builder configuration. E.g. similar to ValueGenerators registration as implemented here: https://github.com/orien/bean-matchers#generating-property-values
Alternatively, having lib checking if there are Joda DateTime classes available and register this or this would be just fine.
Thanks in advance!
The text was updated successfully, but these errors were encountered: