// // Player.swift // BerryLeaderboards // // Created by Lncvrt on 6/9/25. // import Foundation struct Player: Codable { let username: String let score: Int } func parseLeaderboard(_ raw: String) -> [Player] { guard let data = raw.data(using: .utf8) else { return [] } return (try? JSONDecoder().decode([Player].self, from: data)) ?? [] }