www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - struct to json/yaml/xml/whatever codegen

Is anyone aware of a tool which does something akin to the 

Given a C-like definition, automatically generate pure C code 
with no dependencies.

Input c-struct:
   struct Person
     int   id;
     char* name;

Output minimal c-code:
   void dumpPerson(Person* p)
   	printf("<Person><id>%d</id><name>%s</name></Person>", p->id, 

It's easy to write in D... just want to avoid reinventing the 
Sep 29 2016