首页 / 数据工具 / 在线

JSON转C++

JSON自动生成C++结构体代码

数据工具 · 4 次 · 2026-10-04 · 分享 · 全屏
生成 struct + nlohmann::json 的 to_json / from_json 自由函数;类型映射:std::string / std::int64_t / double / bool / std::vector<T> / nlohmann::json 兜底;子结构体先于父结构体输出;std::optional 的 get 支持需 nlohmann/json ≥ 3.11。

📖 使用说明

粘贴 JSON 示例数据,自动生成 C++ 结构体与 to_json 和 from_json 函数,一键复制。

💬 用户评论 (0)

还没有评论,快来抢沙发!

请添加微信联系我