func (x *ApplicationPubSub_MQTTProvider) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.ReadAny()  
		case "server_url", "serverUrl":
			s.AddField("server_url")
			x.ServerUrl = s.ReadString()
		case "client_id", "clientId":
			s.AddField("client_id")
			x.ClientId = s.ReadString()
		case "username":
			s.AddField("username")
			x.Username = s.ReadString()
		case "password":
			s.AddField("password")
			x.Password = s.ReadString()
		case "subscribe_qos", "subscribeQos":
			s.AddField("subscribe_qos")
			x.SubscribeQos.UnmarshalProtoJSON(s)
		case "publish_qos", "publishQos":
			s.AddField("publish_qos")
			x.PublishQos.UnmarshalProtoJSON(s)
		case "use_tls", "useTls":
			s.AddField("use_tls")
			x.UseTls = s.ReadBool()
		case "tls_ca", "tlsCa":
			s.AddField("tls_ca")
			x.TlsCa = s.ReadBytes()
		case "tls_client_cert", "tlsClientCert":
			s.AddField("tls_client_cert")
			x.TlsClientCert = s.ReadBytes()
		case "tls_client_key", "tlsClientKey":
			s.AddField("tls_client_key")
			x.TlsClientKey = s.ReadBytes()
		case "headers":
			s.AddField("headers")
			x.Headers = make(map[string]string)
			s.ReadStringMap(func(key string) {
				x.Headers[key] = s.ReadString()
			})
		}
	})
}
UnmarshalProtoJSON unmarshals the ApplicationPubSub_MQTTProvider message from JSON.
package ttnpb
import (
	gogo "github.com/TheThingsIndustries/protoc-gen-go-json/gogo"
	jsonplugin "github.com/TheThingsIndustries/protoc-gen-go-json/jsonplugin"
)
func (x ApplicationPubSub_MQTTProvider_QoS) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	s.WriteEnumString(int32(x), ApplicationPubSub_MQTTProvider_QoS_name)
}
func (x *ApplicationPubSub_MQTTProvider_QoS) UnmarshalProtoJSON(s *jsonplugin.UnmarshalState) {
	v := s.ReadEnum(ApplicationPubSub_MQTTProvider_QoS_value)
	if err := s.Err(); err != nil {
		s.SetErrorf("could not read QoS enum: %v", err)
		return
	}
	*x = ApplicationPubSub_MQTTProvider_QoS(v)
}
func (x *ApplicationPubSub_MQTTProvider) MarshalProtoJSON(s *jsonplugin.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.ServerUrl != "" || s.HasField("server_url") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("server_url")
		s.WriteString(x.ServerUrl)
	}
	if x.ClientId != "" || s.HasField("client_id") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("client_id")
		s.WriteString(x.ClientId)
	}
	if x.Username != "" || s.HasField("username") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("username")
		s.WriteString(x.Username)
	}
	if x.Password != "" || s.HasField("password") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("password")
		s.WriteString(x.Password)
	}
	if x.SubscribeQos != 0 || s.HasField("subscribe_qos") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("subscribe_qos")
		x.SubscribeQos.MarshalProtoJSON(s)
	}
	if x.PublishQos != 0 || s.HasField("publish_qos") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("publish_qos")
		x.PublishQos.MarshalProtoJSON(s)
	}
	if x.UseTls || s.HasField("use_tls") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("use_tls")
		s.WriteBool(x.UseTls)
	}
	if len(x.TlsCa) > 0 || s.HasField("tls_ca") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("tls_ca")
		s.WriteBytes(x.TlsCa)
	}
	if len(x.TlsClientCert) > 0 || s.HasField("tls_client_cert") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("tls_client_cert")
		s.WriteBytes(x.TlsClientCert)
	}
	if len(x.TlsClientKey) > 0 || s.HasField("tls_client_key") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("tls_client_key")
		s.WriteBytes(x.TlsClientKey)
	}
	if x.Headers != nil || s.HasField("headers") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("headers")
		s.WriteObjectStart()
		var wroteElement bool
		for k, v := range x.Headers {
			s.WriteMoreIf(&wroteElement)
			s.WriteObjectStringField(k)
			s.WriteString(v)
		}
		s.WriteObjectEnd()
	}
	s.WriteObjectEnd()
}