adding to_json to devices index