The result is that valid packets such as {"txpk_ack":{}} are not decoded and an error is thrown. In practice we also see {"txpk_ack":{"error":""}} but we can debate if that's a valid packet or not.
Test to show issue:
fn tx_ack_deser_minimal() {
let json = "{\"txpk_ack\":{}}";
let parsed: Data = serde_json::from_str(json).expect("Error parsing tx_ack");
if let Err(_) = parsed.get_result() {
assert!(false);
}
}
The SX1302 PacketForwarder Semtech GWMP protocol defines all fields in the
txpk_ack
JSON-structure in theTX_ACK
packet as optional. (source: https://github.com/Lora-net/sx1302_hal/blob/master/packet_forwarder/PROTOCOL.md#55-tx_ack-packet)The result is that valid packets such as
{"txpk_ack":{}}
are not decoded and an error is thrown. In practice we also see{"txpk_ack":{"error":""}}
but we can debate if that's a valid packet or not.Test to show issue: