public static RoomInfo getRoomInfoFromJson(JSONObject obj)
	{
		if(obj==null)
			return null;
		RoomInfo roomInfo=new RoomInfo();
		Object value=null;
		JSONArray teams=null;
		JSONObject tmpObj=null;
		Team tmpTeam = null;
		
		value = obj.get("id_room");
		
		if(value!=null)
		{
			roomInfo.setId_room(value.toString());
		}
		
		value = obj.get("time");
		if(value!=null)
		{
			roomInfo.setTime(Long.parseLong(value.toString()));
		}
		value = obj.get("time_left");
		if(value!=null)
		{
			roomInfo.setTime_left(Long.parseLong(value.toString()));
		}
	
		
		value = obj.get("mode");
		if(value!=null)
		{
			roomInfo.setMode(Integer.parseInt(value.toString()));
		}
		
		teams =(JSONArray) obj.get("teams");
		for(int i=0;i<teams.size();i++)
		{
			tmpObj = (JSONObject)teams.get(i);
			if(tmpObj != null)
			{
				tmpTeam = Team.getTeamFromJson(tmpObj);
				if(tmpTeam!=null)
				{
					roomInfo.putTeam(tmpTeam.getId_team(), tmpTeam);
				}
			}
		}
		return roomInfo;
	}