VCV Rack Copy to JSON

Hi there, I want to create a functionality to be able to create json files that can directly be copied to VCV rack and create certain patches. For this I want to use the JSON structure that we get when we copy something from the Nodegraph of VCV. Is there some documentation in this? Which structure is expected, which values need to be present, which can be denied? Also, (for VCV opensource) do the params id in the json match the CPP source paramid by order? How can I find out how many Inputs and Outputs a module has and which ID maps to it? Is there a CPP function available that creates those JSON which I can have a look at?

For any pointers or help I would be thankful!

Cheers, philipp