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

Injected ObjectMapper not actually used for request serialization #328

Open
alechenninger opened this issue Jan 12, 2017 · 0 comments
Open

Comments

@alechenninger
Copy link
Contributor

Request serialization relies on getBody() implementation of request objects, and these delegate to the default object mapper.

So the only way to configure the object mapper used is to mutate the global default or set a new global default via the JSON class.

It looks like this is not a problem with responses.

Architecturally, requests are not created via the client (using it as a factory), but instead they're are newed up independently in client code, which means it's up to clients to inject the right ObjectMapper, and currently it's not injectable at all. One way would be to avoid the String getBody() method on requests, which implies a need for serialization, which implies a need to be able to customize serialization, and instead work exclusively from the JsonNode getBodyJson() method.

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

1 participant