A header-only library and a code generator to automatically translate between JSON and C++ types