Only a vague idea at the moment - as a character witness. I'm thinking something along the lines of 'Dear Judge, with regard to Mr So and So, I have known him for twenty years and he's a bloody good egg'.
As a general rule, character witnesses only really come into play when a defendant has been "potted" (to use defence solicitor parlance) and is attempting to rely on their good egg-dom to avoid a one way trip to some smack-infested Victorian rat hole full of addicts, mentalists and thugs.
Character evidence tends to be given in writing - usually in the form of a letter. There is no particular format, but letters are typically addressed either to the defence solicitor who will hand them over in Court, or "to whom it may concern".
So, I see no issue with you using such a letter in your book.
Regards,
Peter