private List<ResolvedType> treatByteArrayAsString(MemberScope<?, ?> scope) {
        ResolvedType type = scope.getType();
        if (type != null && type.getErasedType().equals(byte[].class)) {
            return Collections.singletonList(scope.getContext().resolve(String.class));
        }
        return null;
    }
Example created in response to <a href="https://github.com/victools/jsonschema-generator/discussions/451">#451</a>.
<br/>
Demonstrating target type overrides to represent a {@code byte[]} as {@code string} with particular content encoding.
jsonschema-examples/src/main/java/com/github/victools/jsonschema/examples/TargetTypeOverrideExample.java