as_json needs to take an argument