Change function call to "to_json"