Created a function to echo players info as JSON