Make Token printing functions output JSON