Override as_json for files