stop manually creating a json string in Record::to_json