Refactor Player toJson