def _create_json(name, description, locked, type, jndiId, connection,
    connectionManager):
    """
    Create a JSON to be used for the REST API call
    """
    json = {'connection': connection, 'type': type, 'jndiId': jndiId,
        'name': name, 'description': description, 'locked': locked}
    if connectionManager is not None:
        json['connectionManager'] = connectionManager
    return json
