-
Notifications
You must be signed in to change notification settings - Fork 115
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
Picking gson instance #577
Comments
Hi, it's currently not possible. But it should be possible to do something like this for Gson. Feel free to submit PR |
It would be handy to have it on API level. something like .withNodeFactory(MyGsonNodeFactory) with a default getGson() in GsonNodeFactory that returns new Gson() could be overridden. Or the GsonNodeFactory could have an abstract getGson() that the default implemention would implements as new Gson(). Could could have different ones for different tests... (haven't checked if it's that applicable to the other serializers but I would assume that they all set up some context) |
Sorry, I forgot about this issue. I will be reluctant to do something like you propose as it would mean making the NodeFactory and Node part of the public API/SPI hindering future refactorings. |
The documentation section "Selecting underlying library" mentions how to pick gson but how do you pick a specific instance (e.g. the one with the registered type adapters you need)?
The text was updated successfully, but these errors were encountered: