I suggest to try to match Python helper module as closely as possible, for consistent result:
https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Python_API/Modules#Shader_Node_Import_.2F_Export
For export of emission and transparency the situation is weak still. We need to add support for those to the Principle BSDF to make this easier, but I’m not sure exactly when it will happen. You could try to automatically detect a similar node setup as you are creating for export, I don’t have a better suggestion until we extend the Principled BSDF.