package metrics import ( "encoding/json" ) // MarshalJSON returns a byte slice containing a JSON representation of all // the metrics in the Registry. func (r *StandardRegistry) MarshalJSON() ([]byte, error) { return json.Marshal(r.GetAll()) }