def strip_json_array(typename):
    """ Strip json array enclosing brackets from a typename.
        [int] -> int
    """
    if typename and typename.startswith('[') and typename.endswith(']'):
        return typename[1:-1]
    return typename