Encapsulate unit and player in json objects
Keys must be string in javascript