Implementing export_json