My inclination would be, if we're just calling to a long-standardized library routine, to just accept its output as is. If a program is saving the output to a text file, that would be the expected behaviour. If not, then we need to document that the output of our function is the output of the library function, minus the trailing newline.
After some digging on the matter, I'd also tend to leave the output as is, but I also do understand the other arguments - specially the consistency with jsonb_pretty().
If we agree to remove it, the change wouldn't be substantial :) I guess we could just pchomp it in the end of the function, as suggested by Tom. Attached a draft patch.
Best, Jim