跳到主要内容
哩度
生活
学习
博客
工具
GFLearn
GitHub
🔍
全部工具
(8)
⚙️
开发工具
(2)
📝
文本处理
(2)
🎨
媒体处理
(2)
🔧
生活工具
(1)
🎮
娱乐游戏
(1)
JSON转Go结构体
模板代码生成器
大小写转换器
编解码工具
图片压缩
橙子头像生成器
二维码生成器
贪吃蛇游戏
将JSON数据转换为Golang结构体定义
🔗 复制链接
JSON 转 Golang 结构体
🔄 转换
🎨 格式化
🗑️ 清空
📝 示例
🏷️ JSON Tag格式:
原始
snake_case
camelCase
kebab-case
JSON 输入
✅ 618 字符
{ "user_info": { "userId": 12345, "user-name": "张三", "emailAddress": "zhangsan@example.com", "phone_number": "13800138000", "is-active": true, "createdAt": "2023-01-01T00:00:00Z", "profile-settings": { "theme_mode": "dark", "notificationEnabled": true, "auto-login": false }, "userRoles": ["admin", "user"], "account_balance": 1000.50 }, "system-info": { "appVersion": "1.0.0", "api_endpoint": "https://api.example.com", "lastUpdated": "2023-12-31T23:59:59Z" } }
Golang 结构体