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:
Charles Allen 2014-11-18 15:16:14 -08:00
parent 42517f5d37
commit 1bbc8fcbe5
1 changed files with 3 additions and 1 deletions

View File

@ -48,7 +48,9 @@ public class JacksonModule implements Module
@Provides @LazySingleton @Smile
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);
return retVal;
}