CmdStanR has write_stan_json(). BridgeStan could use that, too. In addition, BridgeStan would benefit from a to_stan_json() function that would not write to file, but just return a string. I made an issue to bridgestan roualdes/bridgestan#202, but @WardBrian suggested putting it somewhere else, and maybe rstantools would be appropriate?