Skip to content
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

Plugin a different JSON Mapper (Both request and response) #622

Open
dmcocca opened this issue Feb 26, 2016 · 1 comment
Open

Plugin a different JSON Mapper (Both request and response) #622

dmcocca opened this issue Feb 26, 2016 · 1 comment

Comments

@dmcocca
Copy link

dmcocca commented Feb 26, 2016

It appears I can override the default JSON parser by calling "setJsonMapper" on ServiceEndpoint. I do not see a way to swap-out the default mapper for requests. StandardRequestTransformer uses the default mapper:

private final Factory factory = QBit.factory();
protected final ThreadLocal<JsonMapper> jsonMapper = new ThreadLocal<JsonMapper>() {
        @Override
        protected JsonMapper initialValue() {
            return factory.createJsonMapper();
        }
    };

Perhaps I'm missing something, but I could not find a clean way of plugging in a different mapper.

@RichardHightower
Copy link
Member

You can replace the factory. I will try to come up with an example swapping in Jackson instead of Boon.

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

No branches or pull requests

2 participants