def _create_json(name, description, type, searchBaseDN, searchFilter,
                 searchTimeout, serverConnection, cacheSize, cacheLifetime,
                 attributeName, attributeSelector):
    """
    Create a JSON to be used for the REST API call
    """
    json = {
        "name": name,
        "description": description,
        "type": "LDAP",
        "properties": [
            {"key": "searchBaseDN", "value": searchBaseDN, "datatype": "String",
             "sensitive": False, "readOnly": False},
            {"key": "searchFilter", "value": searchFilter,
             "datatype": "String", "sensitive": False, "readOnly": False},
            {"key": "searchTimeout", "value": searchTimeout, "datatype": "Integer",
             "sensitive": False, "readOnly": False},
            {"key": "dataSource", "value": serverConnection,
             "datatype": "String", "sensitive": False, "readOnly": False},
            {"key": "cacheSize", "value": cacheSize, "datatype": "Integer",
             "sensitive": False, "readOnly": False},
            {"key": "cacheLifetime", "value": cacheLifetime, "datatype": "Integer",
             "sensitive": False, "readOnly": False}
        ],
        "attributes": [
            {"name": attributeName, "selector": attributeSelector}
        ]
    }

    return json