Thanks for the explanation! Your project sounds really interesting.
Based on your description it seems that you are trying to use a C++ library which expects the model parameters in the JSON format.
If so, the author is right and I would also try to convert the model.state_dict() to this format by manually parsing it.