Fix _as_string
output to only show when format specified
#10571
Merged
_as_string
output to only show when format specified
#10571