# Where are the interfaces for received MQTT messages?

**URL:** <https://www.thethingsnetwork.org/forum/t/where-are-the-interfaces-for-received-mqtt-messages/47505>\
**Category:** V3 Integrations\
**Created:** [May 8, 2021, 8:58am UTC](https://www.thethingsnetwork.org/forum/t/where-are-the-interfaces-for-received-mqtt-messages/47505 "2021-05-08T08:58:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zandis](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/zandis/32/35697_2.png) [@Zandis](https://www.thethingsnetwork.org/forum/u/Zandis)\
**Post date:** [May 8, 2021, 8:58am UTC](https://www.thethingsnetwork.org/forum/t/where-are-the-interfaces-for-received-mqtt-messages/47505/1 "2021-05-08T08:58:50Z")

</div>

Is there any interface(in java)/schema/description available for received MQTT messages? Basicly what I’m receiving there is plain JSON structure for my uplink messages and I’m not sure how to parse and interpretate them. Can these JSON structures change?

---

<div class="post-metadata">

**Author:** ![bertrik](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/bertrik/32/35697_2.png) [@bertrik](https://www.thethingsnetwork.org/forum/u/bertrik)\
**Post date:** [May 8, 2021, 9:53am UTC](https://www.thethingsnetwork.org/forum/t/where-are-the-interfaces-for-received-mqtt-messages/47505/2 "2021-05-08T09:53:40Z")

</div>

The official description is at:  
[https://www.thethingsindustries.com/docs/reference/data-formats/#uplink-messages](https://www.thethingsindustries.com/docs/reference/data-formats/#uplink-messages)

I don’t think there is really a schema, to indicate for example which fields are mandatory and which ones are optional.

I have some Java code that uses Jackson to decode JSON at [LoraLuftdatenForwarder/Ttnv3UplinkMessage.java at master · bertrik/LoraLuftdatenForwarder · GitHub](https://github.com/bertrik/LoraLuftdatenForwarder/blob/master/LoraLuftdatenForwarder/src/main/java/nl/bertriksikken/ttnv3/dto/Ttnv3UplinkMessage.java)  
but I’m only parsing a few fields that a relevant to me.  
Some properties are parsed using a Java data transfer object with field annotated with @JsonProperty and some other properties are parsed with the JsonNode.at() method. I use @JsonIgnoreProperties(ignoreUnknown = true) to ignore the JSON fields that have no equivalent in my Java code.

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [May 8, 2021, 10:52am UTC](https://www.thethingsnetwork.org/forum/t/where-are-the-interfaces-for-received-mqtt-messages/47505/3 "2021-05-08T10:52:48Z")

</div>

> [@Zandis](#):
>
> I’m not sure how to parse and interpretate them. Can these JSON structures change?

Parsing JSON is parsing JSON - nothing special in that regard. @bertrik has furnished you with everything you need to interpret the fields - if you are not sure what a field may indicate, like `f_port` or `spreading_factor` then you can learn more about LoRaWAN by reading the docs &/or Googling the term.

You can’t change the data structure for MQTT or WebHooks

With API calls you can provide a list of fields that you’d like.
