class JsonTagListAttributeConverter implements AttributeConverter<List<TagItem>, String> {

    @Override
    public String convertToDatabaseColumn(List<TagItem> attribute) {
        return JsonUtil.toJson(attribute);
    }

    @Override
    public List<TagItem> convertToEntityAttribute(String dbData) {<FILL_FUNCTION_BODY>}
}

        TypeReference<List<TagItem>> typeReference = new TypeReference<>() {};
        List<TagItem> tagItems = JsonUtil.fromJson(dbData, typeReference);
        if (tagItems == null) {
            TypeReference<Map<String, String>> mapTypeReference = new TypeReference<>() {};
            Map<String, String> map = JsonUtil.fromJson(dbData, mapTypeReference);
            if (map != null) {
                return map.entrySet().stream().map(entry -> new TagItem(entry.getKey(), entry.getValue())).collect(Collectors.toList());
            } else {
                return null;
            }
        } else {
            return tagItems;
        }

    
<no_super_class>