'Save a visualization; if visualization does not have an ID, a new
visualization is created. Returns JSON of visualization.'

@web.json
def save(self, trans, vis_json=None, type=None, id=None, title=None, dbkey=None, annotation=None):

    vis_config = loads(vis_json)
    vis_type = (type or vis_config['type'])
    vis_id = (id or vis_config.get('id', None))
    vis_title = (title or vis_config.get('title', None))
    vis_dbkey = (dbkey or vis_config.get('dbkey', None))
    vis_annotation = (annotation or vis_config.get('annotation', None))
    return self.save_visualization(trans, vis_config, vis_type, vis_id, vis_title, vis_dbkey, vis_annotation)
