code: func UnmarshalUplinkFrame(b []byte, uf *gw.UplinkFrame) (Type, error) {
  	var t Type
  
  	if strings.Contains(string(b), `"gatewayID"`) {
  		t = JSON
  	} else {
  		t = Protobuf
  	}
  
  	switch t {
  	case Protobuf:
  		return t, proto.Unmarshal(b, uf)
  	case JSON:
  		m := jsonpb.Unmarshaler{
  			AllowUnknownFields: true,
  		}
  		return t, m.Unmarshal(bytes.NewReader(b), uf)
  	}
  
  	return t, nil
  }
docs: // UnmarshalUplinkFrame unmarshals an UplinkFrame.