The way I do it is to simply use the toString method on blockstates to turn them into strings, and then use the command block parser to parse them. I use it so that users can copy blockstates from their debug overlay and add them manually. It works pretty well, but if you can use a better system, do.
https://github.com/Cadiboo/NoCubes/blob/2d116b923e584ecfaa05823ffbccc2e9aedf537e/src/main/java/io/github/cadiboo/nocubes/config/ModConfig.java#L220