An idea, building on the JSON params string: from within C serialise a perl object which will contain all params you want and get() methods to obtain the params. Then either write that to file and have perl read it and de-serialise/resurrect it or hardcode it into the perl script if you create the script on-the-fly as in my previous comment.
JSON is a way to encode a data structure. Whereas the serialised perl object above goes a lot further with error-checking logic, functions, debugging messages etc. BUT it also introduces a lot of security risks; the usual eval() concerns.
Relevant Kraftwerk lyrics:
- Wir fahr'n fahr'n fahr'n auf der
AutoInfobahn
- I'm the operator with my pocket calculator
- By pressing down a special key, it plays a little melody
bliako