mirror of
https://github.com/apache/druid.git
synced 2025-02-10 03:55:02 +00:00
Allow Smile to fall back to text
* Modify SmileFactory to set the delegate to text option. * This option only occurs when a Reader type object is passed in to the deserialization stuff * This is needed by the X-Druid-Response-Context header return value, which is JSON
This commit is contained in:
parent
42517f5d37
commit
1bbc8fcbe5
@ -48,7 +48,9 @@ public class JacksonModule implements Module
|
|||||||
@Provides @LazySingleton @Smile
|
@Provides @LazySingleton @Smile
|
||||||
public ObjectMapper smileMapper()
|
public ObjectMapper smileMapper()
|
||||||
{
|
{
|
||||||
ObjectMapper retVal = new DefaultObjectMapper(new SmileFactory());
|
final SmileFactory smileFactory = new SmileFactory();
|
||||||
|
smileFactory.delegateToTextual(true);
|
||||||
|
final ObjectMapper retVal = new DefaultObjectMapper(smileFactory);
|
||||||
retVal.getFactory().setCodec(retVal);
|
retVal.getFactory().setCodec(retVal);
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user