class TypeUtils {

    static Map.Entry<String,Object> parse(String label, JsonElement element) {
        final String name;
        final String typeName;
        int colonIndex = label.indexOf(":");
        if (colonIndex < 0) {
            name = label;
            typeName = null;
        } else {
            name = label.substring(0, colonIndex);
            typeName = label.substring(colonIndex + 1);
        }
        Type<?> type = findType(typeName);
        return new MapEntry<String, Object>(name, type.parse(element));
    }

}