code: public static <T> JsonMarshaller<T> adapt(final StructuredJsonMarshaller<T> toAdapt) {
          return new BaseJsonMarshaller<T>() {
              @Override
              public void marshall(T val, StructuredJsonGenerator jsonGenerator, JsonMarshallerContext context,
                                   MarshallingInfo<T> marshallingInfo) {
                  toAdapt.marshall(val, jsonGenerator);
              }
          };
      }
docs: Adapt a {@link StructuredJsonMarshaller} to a {@link JsonMarshaller}. {@link JsonMarshaller} has a lot of internal
  stuff so we don't want to expose all that across module boundaries.
  
  @param toAdapt Marshaller to adapt.
  @param <T>     Type of thing being marshalled.
  @return Adapted marshaller.