"It's a beautiful song," said John.

Literal

Beautiful song [copula-だね] [quotative-と] John [subject-が] said.

「美しい曲だね。」とジョンが言いました — dialogue format using 「」 Japanese quotation marks. と marks the quoted speech. ね seeks agreement. Standard reported speech structure.