[–] gyf304 5y 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.*
1 comment
[ 3.9 ms ] story [ 16.9 ms ] threadYou 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.*