create json_print helper and make use