fix REST methods and convert_to_json