```json
{
    "parameters": {
        "side": "provider",
        "release": "2.7.2-SNAPSHOT",
        "methods": "hi,echo,test1,plus",
        "deprecated": "false",
        "dubbo": "2.0.2",
        "interface": "com.alibaba.dubbo.samples.DemoApi",
        "version": "1.0.0",
        "qos.enable": "false",
        "generic": "false",
        "timeout": "3000",
        "revision": "1.0.0",
        "serialization": "hessian2",
        "application": "demo-provider",
        "dynamic": "true",
        "register": "true",
        "bean.name": "com.alibaba.dubbo.samples.DemoApi",
        "group": "DUBBO",
        "anyhost": "true"
    },
    "canonicalName": "com.alibaba.dubbo.samples.DemoApi",
    "methods": [
        {
            "name": "hi",
            "parameterTypes": [
                "com.alibaba.dubbo.samples.Foo"
            ],
            "returnType": "com.alibaba.dubbo.samples.Foo"
        },
        {
            "name": "test1",
            "parameterTypes": [],
            "returnType": "void"
        },
        {
            "name": "echo",
            "parameterTypes": [
                "java.lang.String"
            ],
            "returnType": "java.lang.String"
        },
        {
            "name": "plus",
            "parameterTypes": [
                "int",
                "int"
            ],
            "returnType": "int"
        }
    ],
    "types": [
        {
            "type": "int"
        },
        {
            "type": "void"
        },
        {
            "type": "char"
        },
        {
            "type": "com.alibaba.dubbo.samples.Foo",
            "properties": {
                "name": {
                    "type": "java.lang.String",
                    "properties": {
                        "value": {
                            "type": "char[]"
                        },
                        "hash": {
                            "type": "int"
                        }
                    }
                },
                "age": {
                    "type": "int"
                }
            }
        },
        {
            "type": "java.lang.String",
            "properties": {
                "value": {
                    "type": "char[]"
                },
                "hash": {
                    "type": "int"
                }
            }
        }
    ]
}
```

Type of `char[]` and `int` in `java.lang.String` is unnecessary.
package org.apache.dubbo.metadata.definition;
import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.common.logger.Logger;
import org.apache.dubbo.common.logger.LoggerFactory;
import org.apache.dubbo.metadata.definition.builder.DefaultTypeBuilder;
import org.apache.dubbo.metadata.definition.builder.TypeBuilder;
import org.apache.dubbo.metadata.definition.model.TypeDefinition;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * 2015/1/27.
 */
public class TypeDefinitionBuilder {
    private static final Logger logger = LoggerFactory.getLogger(TypeDefinitionBuilder.class);
    private static final List<TypeBuilder> BUILDERS;
    static {
        List<TypeBuilder> builders = new ArrayList<>();
        ExtensionLoader<TypeBuilder> extensionLoader = ExtensionLoader.getExtensionLoader(TypeBuilder.class);
        for (String extensionName : extensionLoader.getSupportedExtensions()) {
            builders.add(extensionLoader.getExtension(extensionName));
        }
        BUILDERS = builders;
    }
    public static TypeDefinition build(Type type, Class<?> clazz, Map<Class<?>, TypeDefinition> typeCache) {
        TypeBuilder builder = getGenericTypeBuilder(type, clazz);
        TypeDefinition td;
        if (builder != null) {