esp32FOTA
esp32FOTA copied to clipboard
Note possible BOM in payload
Suggestions:
- Print deserialization error if any
- Add warning/note about possible BOM in the hosted .json.
I was hitting "InvalidInput" but couldn't figure it out until I read: https://arduinojson.org/v6/api/misc/deserializationerror/
.. and found out I had a few extra bytes:
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000000 EF BB BF 7B 0A 20 20 20 20 22 74 79 70 65 22 3A {. "type":
00000010 20 22 65 73 70 33 32 2D 66 6F 74 61 2D 6D 61 69 "esp32-fota-mai
00000020 6E 2D 77 65 61 74 68 65 72 22 2C 0A 20 20 20 20 n-weather",.
00000030 22 76 65 72 73 69 6F 6E 22 3A 20 32 2C 0A 20 20 "version": 2,.
I then used Notepad++ to fix it: Encoding >> Encode in UTF-8 without BOM