@Override
    public Optional<Function<Object, Argument>> prepare(Type type, ConfigRegistry config) {
        TypedJsonMapper mapper = config.get(JsonConfig.class).getJsonMapper().forType(type, config);
        Arguments a = config.get(Arguments.class);
        // look for specialized json support first, revert to simple String binding if absent
        Function<Object, Argument> bindJson = JdbiOptionals.findFirstPresent(
                () -> a.prepareFor(ENCODED_JSON),
                () -> a.prepareFor(String.class))
            .orElseThrow(() -> new UnableToCreateStatementException(JSON_NOT_STORABLE));
        return Optional.of((Function<Object, Argument>) value -> {
            String nullableJson = value == null ? null : mapper.toJson(value, config);
            String json = "null".equals(nullableJson) ? null : nullableJson; // json null -> sql null
            return bindJson.apply(json);
        });
    }
converts a value object to json text and delegates to another factory to perform the {@code (@Json) String} binding
json/src/main/java/org/jdbi/v3/json/internal/JsonArgumentFactory.java