So right now I have a struct for client connections which looks as following
type ClientConn struct {
uuid string
websocket *websocket.Conn
ip net.Addr
longitude float64
latitude float64
}
and I've also got a map of ClientConn as following
var clientList = make(map[string]*ClientConn)
so I add a new ClientConn on each connection to the clientList but what I'm trying to do is jsonify the clientList and obtain an array of ClientConn with its values and not just keys.
If I do
json.Marshal(clientList)
then I just get the keys with a empty object and what I'd like to retrieve is the whole ClientConn struct array with the values and keys.
What would be a way to do this?