TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Go-style JSON Marshal / Unmarshal for C structs

2 点作者 gyf304超过 4 年前

1 comment

gyf304超过 4 年前
CMarshal brings Go style JSON marshaling &#x2F; unmarshaling to C.<p>You can generate cJSON based JSON serializers and deserializers by adding a &#x2F;* cmarshal:`true` *&#x2F; comment to your C struct.<p>Potential use cases:<p>* Auto-generated JSON config parsers<p>* Simple struct printer (as a debugging mechanism, my goal in mind for this project)<p>* Introspecting C structs using cJSON API<p>* Easily bloat your program line count! (not the intended use case, of course)<p>Let me know how you think about this.*