TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

2 pointsby gyf304over 4 years ago

1 comment

gyf304over 4 years ago
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.*