Remove types from JsonOut::write_* method names and use templates.