Minify Json if selection line count is not 1

Count text line in the selection and expand or minify depending on the line count (1 line will pretty print, more than 1 line will minify)