rename as_json to attributes