v1.11.3 - Unified JSON Response Format (2025-12-07)¶
What Changed?¶
This release unifies the JSON response format across all data streams (detection events and command responses). Detection events now include a "status":"ok" field alongside the existing "type":"data" header, matching the command response format. This improves consistency for client parsers and enables unified error handling across all message types.
What's New¶
Unified JSON Response Format¶
What it does:
Detection events (JSONL format) now include a "status" field to match command response structure. All JSON messages from the device now follow a consistent format with "type", "status", and data fields.
How to use it:
No changes required for existing code. The new "status":"ok" field is automatically included in all JSONL detection events (STREAM_FORMAT=3). This makes it easier to parse and validate responses uniformly.
Output format:
{"type":"data","status":"ok","hit1":95,"hit2":87,"hit3":91,"adc":2048,"tmp_c":25.35,"atm_pa":101325,"hmd_pct":45.67}
Previously:
{"type":"data","hit1":95,"hit2":87,"hit3":91,"adc":2048,"tmp_c":25.35,"atm_pa":101325,"hmd_pct":45.67}
Installation¶
Quick Start¶
# Get the release
git checkout v1.11.3
# Build
task build
# Upload
task upload
# Check it works
task monitor
What's Different from the Last Version?¶
✅ Added¶
"status":"ok"field in JSONL detection event output (STREAM_FORMAT=3)
🔧 Changed¶
- JSONL detection events now include unified response headers matching command response format
Is It Safe to Upgrade?¶
Backward Compatible: Yes
- Clients using JSONL format (STREAM_FORMAT=3) will receive an additional
"status"field - Non-JSONL formats (SSV, TSV, CSV) are unaffected
- Robust JSON parsers will ignore unknown fields automatically
- Recommended for all users running JSONL format
Tests Passed¶
- ✅ Builds without errors
- ✅ JSONL format correctly includes
"status":"ok"field - ✅ Other formats (SSV, TSV, CSV) remain unchanged
Release Details¶
- Date: 2025-12-07
- Version: v1.11.3
- Files Changed: 1 (src/stream_formatter.cpp)
Next Steps¶
- Implement
"status":"error"handling for failed sensor reads and queue overflows - Extend unified format to other output protocols (WebSocket, HTTP APIs)
- Consider standardized error codes for all failure scenarios