It actually already exists! It's called ``json_dumps``.