Files
Alex Vanderpot 6c9dbf222f Accept numeric SNR/len/RSSI in MeshCore packets messages
The packets-message parser typed every metric field as a string, so any
gateway that emits SNR, RSSI, len, payload_len, packet_type, score, or
duration as a bare JSON number (including negative and fractional values)
failed json.Unmarshal and dropped the entire packet — including the raw
bytes we need.

Introduce a flexString type that accepts either a JSON string or a bare
number (kept verbatim as text) and apply it to those numeric metric
fields. Add tests covering both the numeric and string encodings.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 03:07:06 -04:00
..