private ReadAttempt newJacksonAttempt(JsonParserReader in) throws IOException {
    TokenBuffer buffer = ((JsonParserReader) in).nextTokenBuffer();
    return new ReadAttempt() {
      @Override public Object read(TypeAdapter<?> typeAdapter) throws Exception {
        try(JsonParserReader reader = new JsonParserReader(buffer.asParser())) {
          return typeAdapter.read(reader);
        }
      }
    };
  }
Jackson buffer copy attempt. Use of Jackson's own mechanisms is important to preserve custom elements
such as special embedded objects in BSON or other data formats. Jackson classes should not leak outside
of this' class methods. So when there's no Jackson available in classpath, it will still work
with Gson based implementation.
gson/src/org/immutables/gson/adapter/ExpectedSubtypesAdapter.java