diff --git a/td/generate/tl_json_converter.cpp b/td/generate/tl_json_converter.cpp index f88fff3f4..4ee27697b 100644 --- a/td/generate/tl_json_converter.cpp +++ b/td/generate/tl_json_converter.cpp @@ -224,11 +224,16 @@ void gen_json_converter_file(const tl::simple::Schema &schema, const std::string sb << "namespace td {\n"; sb << "namespace td_api {\n"; if (is_header) { + sb << "\nvoid to_json(JsonValueScope &jv, const tl_object_ptr &value);\n"; sb << "\nStatus from_json(tl_object_ptr &to, td::JsonValue from);\n"; sb << "\nvoid to_json(JsonValueScope &jv, const Object &object);\n"; sb << "\nvoid to_json(JsonValueScope &jv, const Function &object);\n\n"; } else { sb << R"ABCD( +void to_json(JsonValueScope &jv, const tl_object_ptr &value) { + td::to_json(jv, std::move(value)); +} + Status from_json(tl_object_ptr &to, td::JsonValue from) { return td::from_json(to, std::move(from)); }