def format_type(t, includeOptional=True):
    """
    Returns the type as a string.  If the type is an array, then it is prepended with []
    
    :Parameters:
      t
        The type as a dict. Keys: 'type', 'is_array'
    """
    s = ""
    if t.has_key('is_array') and t['is_array']:
        s = "[]%s" % t['type']
    else:
        s = t['type']
    if includeOptional and t.has_key('optional') and t['optional'] == True:
        s += " [optional]"
    return s
Returns the type as a string.  If the type is an array, then it is prepended with []
    
    :Parameters:
      t
        The type as a dict. Keys: 'type', 'is_array'