poor code for convert json or dict to c++ struct header