Settings

Theme

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

github.com

2 points by gyf304 5 years ago · 1 comment

Reader

gyf304OP 5 years ago

CMarshal brings Go style JSON marshaling / unmarshaling to C.

You can generate cJSON based JSON serializers and deserializers by adding a /* cmarshal:`true` */ comment to your C struct.

Potential use cases:

* Auto-generated JSON config parsers

* Simple struct printer (as a debugging mechanism, my goal in mind for this project)

* Introspecting C structs using cJSON API

* Easily bloat your program line count! (not the intended use case, of course)

Let me know how you think about this.*

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection