esphome / esphome/feature-requests
json Component - Add the input string to the parse_json function in the error message
- Dominant language
- No language data
- Stars
- 450
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the problem you have/What new integration you would like**
I'd like to see the input string to the `parse_json` function to aid debugging.
https://github.com/esphome/esphome/blob/fea05e9d33f13a5435f035bcf10d0ea0ef23abc8/esphome/components/json/json_util.cpp#L94
**Please describe your use case for this integration and alternatives you've tried:**
Being able to check what was passed to the json_util function would have aided in tracking down an issue.
**Additional context**
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with esphome/components/json/json_util.cpp at the linked parse_json implementation around line 94. Trace how parse errors are reported and determine where the input string belongs in that message. Done means the parse_json error includes the supplied input string and the JSON component checks still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 62/100