cppgen internal representation to JSON.  first changes
cppgen now generates a json temp file (and drives the generation off that)