I use the tapestry protocol to format a rating using json, and I have some TIPs on how to store ratings (and other pieces of json-encoded data) in nostr.
The below link shows an example of a rating and shows how I wrap it into the content of a kind 39901 event.