Write_Blueflood cleanup

maybe combine this function with the above function `wb_format_json_value_list_nocheck`? Or does it make more sense to keep their logic separate?