no, we just sending the plain binary codes. This have to be decoded by a payload-decoder in ttn.
u = mySerial.read();
mydata[mdc] = u;
The debug output is just formattet for readability, like (50,22,17,10). It´s up to the payload decoder to convert these bytes back to JSON.
You are right, as LoRa bandwidth is limited, one should not forward plain ASCII. So, before sending, we have to encode our data, e.g. a temperature value as two byte binary etc… So in any case the “sender” (which is a raspi running node-red) needs some intelligence for the encoding and we need a fitting decoder on ttn.
The solution has big advantages for us anyway. We have been sending JSON before over WLAN and had lots of trouble with limited range. Now, we put an arduino LoRa-Head on the RPI, transfer decoded values to Serial and get the same data (encoded via TTN) as before. Al the lora-related stuff resides in the arduino, the solution is very transparent.
Shure, we need a decoder on the RPi and an encoder in TTN, but this is done in a minute on both sides, if you use NodeRed. So, we like the solution for its flexibility. Use LoRa where necessary, but also get the same results over WLAN is possible.