将 C# 类转换为 JSON!
粘贴 C# class·record 代码即可生成示例 JSON!支持 System.Text.Json [JsonPropertyName], Newtonsoft.Json [JsonProperty]。适用于 API 文档和测试请求体(sample JSON)。
将 C# 类转换为 JSON!
粘贴 C# class·record 代码即可生成示例 JSON!支持 System.Text.Json [JsonPropertyName], Newtonsoft.Json [JsonProperty]。适用于 API 文档和测试请求体(sample JSON)。
使用案例
- API 文档与测试数据
- 粘贴 DTO 或模型类,即可得到结构正确的示例 JSON,可用于 API 文档、Postman 测试或前端模拟响应。
- 应用序列化规则
- 读取 [JsonPropertyName], [JsonIgnore], record, string?, List·Dictionary, enum,生成实际收发的 JSON 键名和值形式。