c++ web框架 drogon,c++ 快速开发web 框架 经过实际项目开发,根据反馈和修复,已经发布1.3.0版
paozhu框架 集成ORM HTTP/2 功能,压力测试可以平稳运行。
https://github.com/hggq/paozhu
1.3.0版更新内容
新版添加了 结构体或类对象 json_encode json_decode 功能
支持结构体嵌套和组合使用,可以反射输出JSON 或 把JSON解析到对象
比如如下结构体
namespace psy { //@reflect json to_json from_json struct department_outjson_t { unsigned int id = 0; unsigned int key = 0; unsigned int value = 0; unsigned int parentid = 0; unsigned int bianzhi_num = 0; bool isopen = true; bool _is_use = false; std::string title; std::string desc; std::vector<department_outjson_t> children; std::string to_json(std::string aa="",int offset=0; unsigned int from_json( { //**aaaaa /* aaaa [][}] */ char b='}'; if(b=='{' { std::cout<<"assss}sss}{ssss}sss}"<<std::endl; } return 0; } }; //@reflect json to_json from_json struct department_listoutjson_t { unsigned int code=0; struct department_tables { std::vector<department_outjson_t> list; unsigned int total=0; } data; std::vector<std::vector<std::string>> names; }; } // namespace psy
使用方式
std::string jsondep_str = psy::json_encode(depout_data; psy::department_listoutjson_t new_depout_data; psy::json_decode(new_depout_data, jsondep_str; std::string jsondep_str_temp = psy::json_encode(new_depout_data;
更多请访问官方网站